webpack-contrib / worker-loader

A webpack loader that registers a script as a Web Worker
MIT License
1.46k stars 273 forks source link

Worker-loader with inline option produce cjs/loader error on build #310

Open chemiakinav opened 3 years ago

chemiakinav commented 3 years ago

Expected Behavior

Correct webpack build and work when I use worker-loader with the inline option

Actual Behavior

I've got error:

Screenshot 2021-03-24 at 11 00 04

Code

With another options, it works fine, without inline - too (but it produce SCP error, that's why I need inline option)

import Worker from 'worker-loader?inline=no-fallback!./workers/my-worker'