vue-cli-plugin-browser-extension
vue-cli-plugin-browser-extension copied to clipboard
Output background.js in /dist/background.js
According to manifest V3 background.js must be placed in root (./background.js).
I tried to changed vue.config.js as below but the output key is ignored.
const p = require('path');
pluginOptions: {
browserExtension: {
components: {
background: true,
contentScripts: true
},
componentOptions: {
background: {
entry: './src/background.js',
output: {
filename: 'background.js', path: p.resolve(__dirname, 'dist')
}
},
I have solved moving background.js to /public/background.js but I don't know if this is a good practice.
still needed
我已经解决了将 background.js 移动到 /public/background.js 的问题,但我不知道这是否是一个好习惯。
How did you solve it?