manifest-revision-webpack-plugin icon indicating copy to clipboard operation
manifest-revision-webpack-plugin copied to clipboard

Webpack 4 Support for Entry Point

Open davidckim opened this issue 6 years ago • 3 comments

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]',
  },
}

davidckim avatar Mar 12 '18 21:03 davidckim

+1 :pray:

bryceAebi avatar Mar 17 '18 00:03 bryceAebi

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 avatar Mar 17 '18 11:03 nickjj

@nickjj Do you currently have plans to support WebPack 4?

jacobstern avatar Dec 04 '18 01:12 jacobstern