-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't pass external modules to the manualChunks function (#5068)
* fix: don't pass external modules to the manualChunks function * tweak
- Loading branch information
Showing
6 changed files
with
23 additions
and
34 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
19 changes: 19 additions & 0 deletions
19
test/form/samples/external-modules-could-not-be-passed-to-the-manualChunks/_config.js
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,19 @@ | ||
const text = "External modules couldn't be passed to the manualChunks."; | ||
|
||
module.exports = defineTest({ | ||
description: text, | ||
options: { | ||
external: id => { | ||
if (id.endsWith('external.js')) { | ||
return true; | ||
} | ||
}, | ||
output: { | ||
manualChunks(id) { | ||
if (id.endsWith('external.js')) { | ||
throw new Error(text); | ||
} | ||
} | ||
} | ||
} | ||
}); |
File renamed without changes.
1 change: 1 addition & 0 deletions
1
test/form/samples/external-modules-could-not-be-passed-to-the-manualChunks/main.js
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 @@ | ||
import './external.js'; |
27 changes: 0 additions & 27 deletions
27
test/function/samples/manual-chunks-include-external-modules2/_config.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/function/samples/manual-chunks-include-external-modules2/external.js
This file was deleted.
Oops, something went wrong.