vue-cli-plugin-browser-extension icon indicating copy to clipboard operation
vue-cli-plugin-browser-extension copied to clipboard

Output background.js in /dist/background.js

Open leoplct opened this issue 4 years ago • 3 comments

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')
          }
        },

leoplct avatar Mar 22 '21 16:03 leoplct

I have solved moving background.js to /public/background.js but I don't know if this is a good practice.

leoplct avatar Mar 24 '21 14:03 leoplct

still needed

leodev87 avatar Jan 08 '22 12:01 leodev87

我已经解决了将 background.js 移动到 /public/background.js 的问题,但我不知道这是否是一个好习惯。

How did you solve it?

cbs8710064 avatar Sep 24 '22 06:09 cbs8710064