Custom Webpack config for platform-webworker or worker-loader
See original GitHub issueHello,
I have to run some angular code inside a separated thread. With ng eject being currently disabled, is it possible to use angular-cli-builders in order modify the webpack configuration to use platform-webworker or worker-loader ?
Example: webpack config proposed for worker-loader:
// webpack.config.js { module: { rules: [ { test: /\.worker\.js$/, use: { loader: 'worker-loader' } } ] } }
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:33 (13 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can confirm the configuration provided here works, applied it to my project just now. The only thing I had to enhance was absolutizing the path to the
entryModule
in theAotPlugin
configuration:otherwise I kept getting build errors, with complaints that the
app/app.module
can’t be found. Other than that, it just works! Great job and many thanks @Ajyress!My final configuration:
angular.json:
extra-webpack.config.js:
I’m still new to wepback, I can’t tell this configuration is optimal or not but it works