-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert: do not use heuristic fallback for "module-import"
- Loading branch information
Showing
11 changed files
with
158 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
test/configCases/externals/module-import-externals-presets/index.js
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
test/configCases/externals/module-import-externals-presets/test.filter.js
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
test/configCases/externals/module-import-externals-presets/webpack.config.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import external0 from "external0"; // module | ||
const external1 = require("external1"); // module | ||
const external2 = require("external2"); // node-commonjs | ||
const external3 = import("external3"); // import | ||
|
||
console.log(external0, external1, external2, external3); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
|
||
it("module-import should correctly get fallback type", function() { | ||
const content = fs.readFileSync(path.resolve(__dirname, "a.js"), "utf-8"); | ||
expect(content).toContain(`import * as __WEBPACK_EXTERNAL_MODULE_external0__ from "external0";`); // module | ||
expect(content).toContain(`import * as __WEBPACK_EXTERNAL_MODULE_external1__ from "external1";`); // module | ||
expect(content).toContain(`module.exports = __WEBPACK_EXTERNAL_createRequire(import.meta.url)("external2");`); // node-commonjs | ||
expect(content).toContain(`module.exports = import("external3");`); // import | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
findBundle: (i, options) => ["main.js"] | ||
}; |
Oops, something went wrong.