We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import.meta.path
1.1.42+50eec0025
Linux 6.8.0-51-generic x86_64 x86_64
Create a file named lib/a.js.
lib/a.js
export const obj = { path: import.meta.path };
And another file main.js that import that file:
main.js
console.log((await import('./lib/a.js')).default.path);
And bundle it using Bun.build or the CLI to bundled.js.
Bun.build
bundled.js
Run the main.js and bundled.js file.
Both file should output:
/.../lib/a.js
bundled.js output:
/.../main.js
I see import.meta.path kept as it is in the output so something should be wrong there.
The text was updated successfully, but these errors were encountered:
Is this an issue with all bundlers? I see the same behavior in esbuild as well.
esbuild
Sorry, something went wrong.
No branches or pull requests
What version of Bun is running?
1.1.42+50eec0025
What platform is your computer?
Linux 6.8.0-51-generic x86_64 x86_64
What steps can reproduce the bug?
Create a file named
lib/a.js
.And another file
main.js
that import that file:And bundle it using
Bun.build
or the CLI tobundled.js
.Run the
main.js
andbundled.js
file.What is the expected behavior?
Both file should output:
What do you see instead?
bundled.js
output:Additional information
I see
import.meta.path
kept as it is in the output so something should be wrong there.The text was updated successfully, but these errors were encountered: