3

I'm using worker-loader in a Rails / Webpacker setup. worker-loader is an easy way to use Web-workers in Webpack.

yarn add worker-loader

As per Webpacker instructions, I'm adding this loader to environments.js.

environment.loaders.append('worker', {
  test: /\.worker\.js$/,
  use: 'worker-loader',
});

and finally, adding the .worker.js extension to webpacker.yaml

When running the app, or building directly via ./bin/webpack --progress I'm running out of Heap memory, or it gets stuck and never finishes.

If I comment out the worker-loader line in environments.js, Webpacker finishes up quickly without error.

Anyone run into anything similar?

GN.
  • 8,672
  • 10
  • 61
  • 126

0 Answers0