-
Notifications
You must be signed in to change notification settings - Fork 79
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
Trailing Comma in the LoaderOption causes SyntaxError on removing type:module
#25
Comments
This can happen frequently if developers are using code formatter like Prettier. |
ooof! good catch. |
the same is happen if you use additional options like: new Worker('./monaco-css.worker', { type: 'module', name: 'monaco-css' }); My current Workaround is to flip Why |
@viceice preserving |
If anyone has a deep working knowledge of Webpack's funky parser modifiers, this is the line that replaces |
At first, I think this is not only by the WorkerPlugin's implementation.
Problem
When
{type: 'module'}
contains trailing-comma like below, compiled JavaScript is broken.Workaround
Removing the comma.
Version
I confirm reproducing in v3.0.0 and v3.1.0.
The text was updated successfully, but these errors were encountered: