Skip to content

Commit

Permalink
reduce name collisions with import namespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Dec 31, 2020
1 parent f702341 commit 5e8f979
Show file tree
Hide file tree
Showing 8 changed files with 144 additions and 144 deletions.
12 changes: 6 additions & 6 deletions internal/bundler/snapshots/snapshots_dce.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ var require_foo = __commonJS((exports, module) => {
});

// Users/user/project/node_modules/pkg/index.js
var foo = __toModule(require_foo());
var import_foo = __toModule(require_foo());

// Users/user/project/entry.js
console.log(foo.default);
console.log(import_foo.default);

================================================================================
TestJSONLoaderRemoveUnused
Expand Down Expand Up @@ -149,7 +149,7 @@ var require_index_main = __commonJS((exports) => {
});

// Users/user/project/src/entry.js
var demo_pkg = __toModule(require_index_main());
var import_demo_pkg = __toModule(require_index_main());

// Users/user/project/src/require-demo-pkg.js
require_index_main();
Expand Down Expand Up @@ -265,8 +265,8 @@ var require_demo_pkg = __commonJS((exports) => {
});

// Users/user/project/src/entry.js
var demo_pkg = __toModule(require_demo_pkg());
console.log(demo_pkg.foo);
var import_demo_pkg = __toModule(require_demo_pkg());
console.log(import_demo_pkg.foo);

================================================================================
TestPackageJsonSideEffectsFalseKeepNamedImportES6
Expand Down Expand Up @@ -366,7 +366,7 @@ var require_demo_pkg = __commonJS((exports) => {
});

// Users/user/project/src/entry.js
var demo_pkg = __toModule(require_demo_pkg());
var import_demo_pkg = __toModule(require_demo_pkg());
console.log("unused import");

================================================================================
Expand Down
Loading

0 comments on commit 5e8f979

Please sign in to comment.