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

Extension not reloading (webpack-extension-reloader) #663

Open
leoplct opened this issue Mar 25, 2021 · 0 comments
Open

Extension not reloading (webpack-extension-reloader) #663

leoplct opened this issue Mar 25, 2021 · 0 comments

Comments

@leoplct
Copy link

leoplct commented Mar 25, 2021

My app is succesully compiling in dev mode but chrome extension is not reloading automatically.
I have read the documentation here: https://vue-web-extension.netlify.app/intro/development-workflow.html#watching-mode-and-hot-module-reload
Should I add something?

% npm run serve

> [email protected] serve
> vue-cli-service build --mode development --watch
⠙  Building for development...[ Starting the Hot Extension Reload Server... ]
⠋  Building for development...
 DONE  Compiled successfully in 1126ms                                                                                                                                                              15:01:36

  File                         Size                                                                                 Gzipped

  dist/js/page.js       624.92 KiB                                                                           122.10 KiB
  dist/js/results.js    164.01 KiB                                                                           29.27 KiB
  dist/js/chunk-vendors.js     117.80 KiB                                                                           19.71 KiB
  dist/js/popup.js             48.90 KiB                                                                            10.62 KiB
  dist/js/options.js           7.71 KiB                                                                             2.11 KiB
  dist/background.js           0.05 KiB                                                                             0.06 KiB

  Images and other types of assets omitted.

 DONE  Build complete. Watching for changes...

vue.config.js

module.exports = {
  filenameHashing: false,
  pages: {
    popup: {
      template: 'public/browser-extension.html',
      entry: './src/popup/main.js',
      title: 'Popup'
    },
    options: {
      template: 'public/browser-extension.html',
      entry: './src/options/main.js',
      title: 'Options'
    }
  },
  pluginOptions: {
    browserExtension: {
      components: {
        background: true,
        contentScripts: true
      },

      componentOptions: {
        contentScripts: {
          entries: {
            "detail-page": 'src/content-scripts/page.js',
            "search-results": 'src/content-scripts/results.js',
          },
        },
      },

      manifestTransformer: (manifest) => {
        delete manifest.content_security_policy
        return manifest;
      }

    }
  },
  configureWebpack: {
    devtool: false,
  }
}

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

1 participant