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

Webworkify-webpack v2.1.5 config for node_modules dependency Cannot read property 'call' of undefined #42

Open
ioedeveloper opened this issue Jul 7, 2020 · 0 comments

Comments

@ioedeveloper
Copy link

ioedeveloper commented Jul 7, 2020

Hi,
I can't get webworkify-webpack working for a node_module dependency that uses webworkify v^1.2.1 and uses the require('./worker') rather than require.resolve('./worker') for v2.1.5
Here is my webpack.config.js.

module.exports = {
  entry: {
    app: ['./example/main.js']
  },
  output: {
    filename: 'output.js',
    pathinfo: true
  },
  module: {
    rules: [
      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        use: [
          {
            loader: 'babel-loader',
            options: {
              presets: ['es2015']
            }
          }
        ]
      }
    ]
  },
  resolve: {
      alias: {
          'webworkify': 'webworkify-webpack'
      }
  },
  plugins: [
    new webpack.NamedModulesPlugin()
  ]
}

How can i get it working with my dependency without having to alter my dependency code? Thanks, your help is greatly appreciated!

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

1 participant