Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Unexpected token: name «__insane_func», expected: punc «;» #93

Closed
DoranYun opened this issue Jan 5, 2020 · 1 comment
Closed

Unexpected token: name «__insane_func», expected: punc «;» #93

DoranYun opened this issue Jan 5, 2020 · 1 comment

Comments

@DoranYun
Copy link

DoranYun commented Jan 5, 2020

Unexpected token when uglify the project

image

in the node_modules/monaco-editor/esm/vs/base/common/insane/insane.js[24]

let __insane_func;
@alexdima
Copy link
Member

alexdima commented Jan 6, 2020

AFAIK the uglify webpack plugin is deprecated and cannot handle the latest ESM syntax. AFAIK everyone is moving to Terser.

See https://github.com/webpack-contrib/uglifyjs-webpack-plugin

For example, here is how I adopted Terser: microsoft/monaco-editor-samples@03a2082#diff-ee9a57c44e5fe3fe3671f95bd1d45d32

@alexdima alexdima closed this as completed Jan 6, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants