You are viewing a single comment's thread from:

RE: UTmod: Introducing an extension for Utopian reviewers

in #utmod6 years ago

you can remove unsafe-eval for production in that case.
I actually setup 2 manifest.json, 1 is for development and 1 is for production

  process.env.NODE_ENV === 'production'
    ? [
        {
          from: path.resolve('src/manifest.production.json'),
          to: `${path.resolve('dist')}/manifest.json`,
        },
      ]
    : [
        {
          from: path.resolve('src/manifest.development.json'),
          to: `${path.resolve('dist')}/manifest.json`,
        },
      ];

I written a vue.js based cli generator plugin, which will generate both files shown in here https://github.com/superoo7/vue-cli-plugin-chrome-ext/blob/8902ef6645045ade463b40dea132f92ac5b63615/generator/generate/manifest.js