Closed geeklibin closed 1 year ago
The plugin doesn't build the chrome_url_overrides
by default (I should add this), but you can build additional files using the additionalInputs
option. Make sure to use the absolute path to your html file.
// ./vite.config.ts
import webExtension from 'vite-plugin-web-extension';
import path from 'path';
export default defineConfig({
plugins: [
webExtension({
// ...
additionalInputs: [path.resolve(__dirname, "src/newtab/index.html")],
},
],
})
The plugin doesn't build the
chrome_url_overrides
by default (I should add this), but you can build additional files using theadditionalInputs
option. Make sure to use the absolute path to your html file.// ./vite.config.ts import webExtension from 'vite-plugin-web-extension'; import path from 'path'; export default defineConfig({ plugins: [ webExtension({ // ... additionalInputs: [path.resolve(__dirname, "src/newtab/index.html")], }, ], })
Thank you
你好,我想在扩展中添加
new-tab
,从而实现自定义浏览器新标签的空白页。 但我尝试了在src/menifest.json
中添加了:并且添加了:
src/newtab/index.html
但是当我运行npm run dev(vite build --watch)
,编译完成后,却弹出无法加载清单。
,并且未在dist文件夹中找到newtab/index.html
文件,但是dist/menifest.json中的配置是存在chrome_url_overrides.newtab
配置的。我应该如何配置和操作,希望得到你的帮助,非常感谢