Skip to content
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

点赞!! #2

Open
kinorsi opened this issue Oct 31, 2024 · 1 comment
Open

点赞!! #2

kinorsi opened this issue Oct 31, 2024 · 1 comment

Comments

@kinorsi
Copy link

kinorsi commented Oct 31, 2024

太帅了!有个问题,这个要打包的话nodemodule这些怎么精简一下不?谢谢。

@GrinZero
Copy link
Owner

你想减少体积吗?这其实只是做了一个简单的包装,即 babel+eval5。而要在 chrome 插件中执行 eval 的话,必备 eval5 的运行时(129kb),可选@babel/standalone用来确保可以执行更新标准的 JS 代码,需要支持的越多体积越大(因为需要翻译成 ES5),我图省事是全量加的。

精简方向是降低 target 预期

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants