Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack 4 Support for Entry Point #42

Open
davidckim opened this issue Mar 12, 2018 · 3 comments
Open

Webpack 4 Support for Entry Point #42

davidckim opened this issue Mar 12, 2018 · 3 comments

Comments

@davidckim
Copy link

davidckim commented Mar 12, 2018

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]',
  },
}
@bryceAebi
Copy link

+1 🙏

@nickjj
Copy link
Owner

nickjj commented Mar 17, 2018

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.

@jacobstern
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants