mirror of https://github.com/webpack/webpack.git
31 lines
490 B
JavaScript
31 lines
490 B
JavaScript
/** @type {import("../../../../").Configuration} */
|
|
module.exports = {
|
|
output: {
|
|
filename: "[name].mjs",
|
|
library: {
|
|
type: "module"
|
|
}
|
|
},
|
|
target: ["web", "node"],
|
|
experiments: {
|
|
outputModule: true
|
|
},
|
|
optimization: {
|
|
minimize: true,
|
|
runtimeChunk: "single",
|
|
splitChunks: {
|
|
cacheGroups: {
|
|
separate: {
|
|
test: /separate/,
|
|
chunks: "all",
|
|
filename: "separate.mjs",
|
|
enforce: true
|
|
}
|
|
}
|
|
}
|
|
},
|
|
externals: {
|
|
"external-self": "./main.mjs"
|
|
}
|
|
};
|