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

vite-chrome-extension 后续 #6

Open
KipSong opened this issue Mar 3, 2022 · 0 comments
Open

vite-chrome-extension 后续 #6

KipSong opened this issue Mar 3, 2022 · 0 comments

Comments

@KipSong
Copy link
Owner

KipSong commented Mar 3, 2022

目前 vite-chrome-extension 没提供一些插件功能,只是简单的去构建了一套使用框架去支持的开发。

在团队内部中,我们同样在这个基础之上做了很多改造
比如 contentScript、backgroundScript、tabPage、Popup等不同的Manifest.json中文件依赖的一些文件。

你可能遇到的问题有:

  1. 如何在 contentScript 写TSX输出。
  2. 如何让 BackgroundScript 输出ES 模块。
  3. 如何让 ContentScript 输出 UMD 模块。

这类问题Vite 并不能根据多路口的方式生成不同的模块规范,可以使用多个脚本去输出:

vite build && rollup -c content.script.ts && rollup -c background.script.ts 
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

1 participant