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

Chrome manifest 3 version #14

Closed
leodev87 opened this issue Jan 12, 2022 · 3 comments
Closed

Chrome manifest 3 version #14

leodev87 opened this issue Jan 12, 2022 · 3 comments

Comments

@leodev87
Copy link

Greetings.
Sorry to bother you if it's not difficult I would like to get some answers to the newbie's questions.
environment:

  • manifest 3 versions
  • vue 2

The build works fine for production, but it's not clear how to develop.
"npm run serve" does not compile the files, it only starts the server.
"build-watch" doesn't work due to security policies

  1. When working with 3 manifests, will you have to build and update the extension manually every time?
  2. What are two manifests used for?
  3. How to set up the plugin so that during development the cli does not compile files using eval? Or how to bypass this step during plugin development with version 3 manifest?

Thank you

@sanyu1225
Copy link
Owner

sanyu1225 commented Jan 13, 2022

  1. yes , it's bothers me
  2. manifest 3 A step in the direction of security, privacy, and performance.
  3. manifest_version 3 can't use npm run build-watch beacause version 3 can't support CSP
    There is currently no idea to bypass this rule , haha
    If you have better ideas, you can make reference suggestions

@Gsonovb
Copy link

Gsonovb commented Jan 19, 2022

HI , I found a way

https://stackoverflow.com/questions/67364003/use-vue3-and-vue-cli-to-develop-chrome-extension-how-to-hot-reload-the-code

vue.config.js


module.exports = {
  pages,
  filenameHashing: false,

  configureWebpack: {
    devtool: "inline-source-map",  //<<<here
    plugins: [
      CopyWebpackPlugin([
        {
          from: path.resolve(`src/manifest.${process.env.NODE_ENV}.json`),
          to: `${path.resolve("dist")}/manifest.json`,
        },
      ]),
    ],
    output: {
      filename: `js/[name].js`,
      chunkFilename: `[name].js`,
    },
  },
};

@sanyu1225
Copy link
Owner

Thank Gsonovb , shadrachbaldon
Now , support use npm run build-watch

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

3 participants