-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Added the [email protected] plugin for webpack config , and got the problem.
Redo
step 1. webpack --config webpack.dll.babel.js --progress
step 2. webpack --config webpack.build.babel.js --watch --progress
and the terminal logs always changed between two kinds of logs, but the files not be modified.
config
below was basic config:
/** webpack.dll.babel.js */
export default {
entry: {
common: [
'@babel/polyfill',
'es6-promise',
'vue',
// ....
]
},
output: {
path: path.resolve(__dirname, '../dist'),
filename: 'manifest/[name].dll.js?[chunkhash]',
library: '[name]',
},
plugins: [
new webpack.DllPlugin({
context: '.',
name: '[name]',
path: path.resolve(__dirname, `../dist/manifest/[name].dll.json`),
}),
],
}
/** webpack.build.babel.js */
export default {
entry: {
main: path.resolve(__dirname, '../app/main.js'),
},
output: {
path: path.resolve(__dirname, '../dist'),
filename: `js/[name].js?[hash]`,
chunkFilename: `js/[name].js?[hash]`
},
plugins: [
new webpack.DllReferencePlugin({
context: '.',
manifest: require(path.resolve(
__dirname,
`../dist/manifest/common.dll.json`,
)),
}),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, '../app/index.template.html'),
filename: 'index.html',
}),
new AddAssetHtmlPlugin({
hash: true,
publicPath: 'manifest/',
outputPath: 'manifest/',
filepath: path.resolve(__dirname, '../dist/manifest/*.dll.js'),
}),
],
};devDependencies
Metadata
Metadata
Assignees
Labels
No labels