lisonge / vite-plugin-monkey

A vite plugin server and build your.user.js for userscript engine like Tampermonkey, Violentmonkey, Greasemonkey, ScriptCat

Repository from Github https://github.comlisonge/vite-plugin-monkeyRepository from Github https://github.comlisonge/vite-plugin-monkey

使用了js-beautify,配置externalGlobals打包后报错

xFeny opened this issue · comments

使用了js-beautify,配置externalGlobals打包后报错
1728977902565
这种情况该如何解决

Please provide the project files to reproduce this issue.

我是在代码中import beautifyJS from "js-beautify";
1728980023733

在vite.config.js配置externalGlobals
1728979762154
打包后浏览器就提示报错
1728979898513

the exportVarName of js-beautify is beautifier

- cdn.unpkg("js-beautify", "xxx")
+ cdn.unpkg("beautifier", "xxx")