adambullmer / vue-cli-plugin-browser-extension

Browser extension development plugin for vue-cli 3.0
GNU Lesser General Public License v3.0
427 stars 76 forks source link

Support config of webpack-extension-reloader #62

Closed franciscolourenco closed 5 years ago

franciscolourenco commented 5 years ago

Example usage:

pluginOptions: {
  browserExtension: {
    extensionReloaderOptions: {
      reloadPage: false,
      entries: {
        background: 'background',
        contentScript: ['content_scripts/content'],
      },
    },
  },
}

The same can be achieved with chainWebpack, but it requires conditionals and looks more complicated. Example:

if (process.env.NODE_ENV !== 'production') {
  config.plugin('extension-reloader').tap(([options]) => {
    return [
      {
        ...options,
        reloadPage: false,
        entries: {
          background: 'background',
          contentScript: ['content_scripts/content'],
        },
      },
    ]
  })
}

It seems like it should be the responsibility of this plugin to provide a way to customize the options.

franciscolourenco commented 5 years ago

bump

adambullmer commented 5 years ago

Sorry for the wait on this one, I got married a couple of weeks ago and couldn't grab enough time to give this the necessary attention

franciscolourenco commented 5 years ago

Congratulations @adambullmer 🎉