manifest-revision-webpack-plugin
manifest-revision-webpack-plugin copied to clipboard
Webpack 4 Support for Entry Point
In Webpack 4, it looks like you have to define an entry point in the config or it will default to ./src
.
I am getting this error when trying to run the manifest:
ERROR in Entry module not found: Error: Can't resolve './src' in path'
module.exports = {
module: {
rules: [
{
test: /\.(jpe?g|png|gif|svg|css|ico|pdf|mp3|mp4|webm|eot|ttf|woff|woff2|otf|js)$/i,
use: [
{
loader: 'file-loader',
options: {
context: rootAssetPath,
name: '[path][name].[hash].[ext]',
},
},
],
},
],
},
plugins: [
new ManifestRevisionPlugin(path.join('collected', 'manifest.json'), {
rootAssetPath,
ignorePaths: ['/akamai', '/img-sources', '/vendor', 'scss', 'return_label_print.html',
/\.(txt|xml|md|ai|map|json|normal|gitignore|DS_Store|jsx)$/i],
}),
],
output: {
path: path.join(__dirname, 'collected'),
filename: '[name].[hash].[ext]',
},
}
+1 :pray:
Hi,
I haven't upgraded to webpack 4 yet but you're more than welcome to send a PR to fix this. As long as it continues to work with webpack 2 and 3 I'd merge it.
@nickjj Do you currently have plans to support WebPack 4?