New issue
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
Named default import symbols get incorrectly renamed #9868
Comments
What problem is this causing? When you bundle ESM modules, some renaming has to take place. Modules are bundled before they can be used in |
@kitsonk Sorry for being unclear, I rephrased the issue. const someObj = {
Parser
}
assert(someObj.Parser) both in |
cc/ @kdy1 Looks like some default import symbols get renamed, which then causes unexpected/breaking changes in the downstream code. |
Occurs with any aliased imports: import { foo } from './temp2.ts';
console.log({
foo
}); // temp2.ts
const bar = 1;
export { bar as foo }; Bundle output: console.log({
bar: 1
}); Expected: console.log({
foo: 1
}); SWC should ensure |
swc_bundler: - Fix inlining pass. (denoland/deno#9868)
Fixed on upstream. (Published a new version) |
swc_bundler: - Fix inlining pass. (denoland/deno#9868)
Fixed in 1.9.0 |
There seems to be a distinction between the names of an exported value between
deno run
anddeno compile
when importing an object and using it as a key in a new objectIn
'https://deno.land/x/yargs_parser@v20.2.4-deno/deno.ts'
In
'https://deno.land/x/yargs/deno.ts'
This will create
{yargParser: Parser}
indeno compile
which is unexpected.Expected value would be
{Parser: Parser}
which is the result you get withdeno run
Related: yargs/yargs#1891
The text was updated successfully, but these errors were encountered: