I am intended to handle the styles in different ways between my source codes and node_modules.
The styles from node_modules will extracted to static/css/node_module_styles_[md5:contenthash:base64:6].css, and the styles from my source codes will be extracted to static/css/main.8a41ccd7.css.
[
new ManifestPlugin(),
new ExtractTextPlugin({
filename: 'static/css/[name].[contenthash:8].css',
}),
new ExtractTextPlugin({
filename: 'static/css/node_module_styles.[md5:contenthash:base64:6].css',
}),
]
I find that default behavior to generate a manifest:
webpack config
I am intended to handle the styles in different ways between my source codes and
node_modules
.The styles from
node_modules
will extracted tostatic/css/node_module_styles_[md5:contenthash:base64:6].css
, and the styles from my source codes will be extracted tostatic/css/main.8a41ccd7.css
.rules:
plugins:
I find that default behavior to generate a manifest:
https://github.com/danethurber/webpack-manifest-plugin/blob/ae03fbdcd4ba8073f66efd7b97eec8df318b0c87/lib/plugin.js#L148
Actually the files are most same.
The names of two chunks are same. Refer to the code in extract-text-webpack-plugin: https://github.com/webpack-contrib/extract-text-webpack-plugin/blob/master/src/index.js#L135
The later item of
files
array will overwrite the the former. So theasset-manifest
file would be wrong.Actually result
What I expect
webpack-manifest-plugin: 1.3.2 extract-text-webpack-plugin: 3.0.2 webpack: 3.8.1