Skip to content
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

bundling same module with different local names #8258

Closed
kitsonk opened this issue Nov 5, 2020 · 5 comments
Closed

bundling same module with different local names #8258

kitsonk opened this issue Nov 5, 2020 · 5 comments
Labels
duplicate a duplicate of another issue

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Nov 5, 2020

I also have a bug with "deno bundle" (deno 1.5 regression), it seems to be the same bug.
I was able to reduce the test size:
bug
bug.ts:

import { posix  } from "https://deno.land/[email protected]/path/mod.ts";
import { posix as posix74 } from "https://deno.land/[email protected]/path/mod.ts";
console.log( posix.sep, posix74.sep);

the script:

$ ./deno-1.4.6 bundle ./bug.ts bug.js && ./deno-1.4.6 run ./bug.js
$ ./deno-1.5.1 bundle ./bug.ts bug.js && ./deno-1.5.1 run ./bug.js

Originally, I got this bug when I launched "deno bundle" on the project https://github.com/jersou/markdown-explorer-server

$ deno bundle --unstable https://raw.githubusercontent.com/jersou/markdown-explorer-server/main/server.ts mds.js
$ deno run mds.js
error: Uncaught ReferenceError: _posix is not defined
const path3 = isWindows1 ? _win321 : _posix;
                                     ^
    at file:///home/jer/mds.js:10940:38

I hope it helps

Originally posted by @jersou in #8246 (comment)

@kitsonk
Copy link
Contributor Author

kitsonk commented Nov 5, 2020

@jersou it is a different underlying issue, but still an issue, so I broke it out to its own.

@kitsonk kitsonk added bug Something isn't working correctly cli related to cli/ dir upstream Changes in upstream are required to solve these issues labels Nov 5, 2020
@kdy1
Copy link

kdy1 commented Nov 6, 2020

@kitsonk Is this a bug of swc_bundler?

@kitsonk
Copy link
Contributor Author

kitsonk commented Nov 6, 2020

I am not 100% sure yet. I haven't had the time to try to re-produce or re-create it.

@kitsonk kitsonk added needs investigation requires further investigation before determining if it is an issue or not swc related to swc (bundling/transpiling) and removed cli related to cli/ dir upstream Changes in upstream are required to solve these issues labels Nov 17, 2020
@lucacasonato
Copy link
Member

@kitsonk Possible dupe of #8530 which is now resolved?

@kitsonk kitsonk added duplicate a duplicate of another issue and removed bug Something isn't working correctly needs investigation requires further investigation before determining if it is an issue or not swc related to swc (bundling/transpiling) labels Dec 1, 2020
@kitsonk
Copy link
Contributor Author

kitsonk commented Dec 1, 2020

Yeah looks like a dupe of #8530 though this was first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate a duplicate of another issue
Projects
None yet
Development

No branches or pull requests

3 participants