Framework updates
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
16
node_modules/webpack/lib/WebpackOptionsApply.js
generated
vendored
16
node_modules/webpack/lib/WebpackOptionsApply.js
generated
vendored
@@ -60,6 +60,7 @@ const URLPlugin = require("./dependencies/URLPlugin");
|
||||
const WorkerPlugin = require("./dependencies/WorkerPlugin");
|
||||
|
||||
const JavascriptModulesPlugin = require("./javascript/JavascriptModulesPlugin");
|
||||
const JavascriptParser = require("./javascript/JavascriptParser");
|
||||
|
||||
const JsonModulesPlugin = require("./json/JsonModulesPlugin");
|
||||
|
||||
@@ -371,7 +372,9 @@ class WebpackOptionsApply extends OptionsApply {
|
||||
|
||||
new JavascriptModulesPlugin().apply(compiler);
|
||||
new JsonModulesPlugin().apply(compiler);
|
||||
new AssetModulesPlugin().apply(compiler);
|
||||
new AssetModulesPlugin({
|
||||
sideEffectFree: options.experiments.futureDefaults
|
||||
}).apply(compiler);
|
||||
|
||||
if (!options.experiments.outputModule) {
|
||||
if (options.output.module) {
|
||||
@@ -483,11 +486,18 @@ class WebpackOptionsApply extends OptionsApply {
|
||||
new HttpUriPlugin(httpOptions).apply(compiler);
|
||||
}
|
||||
|
||||
if (options.experiments.deferImport) {
|
||||
const JavascriptParser = require("./javascript/JavascriptParser");
|
||||
if (
|
||||
options.experiments.deferImport &&
|
||||
!(
|
||||
/** @type {typeof JavascriptParser & { __importPhasesExtended?: true }} */
|
||||
(JavascriptParser).__importPhasesExtended
|
||||
)
|
||||
) {
|
||||
const importPhases = require("acorn-import-phases");
|
||||
|
||||
JavascriptParser.extend(importPhases({ source: false }));
|
||||
/** @type {typeof JavascriptParser & { __importPhasesExtended?: true }} */
|
||||
(JavascriptParser).__importPhasesExtended = true;
|
||||
}
|
||||
|
||||
new EntryOptionPlugin().apply(compiler);
|
||||
|
||||
Reference in New Issue
Block a user