Skip to content

Conversation

@franciscolourenco
Copy link
Contributor

@franciscolourenco franciscolourenco commented Oct 17, 2019

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
Copy link
Contributor Author

bump

@adambullmer adambullmer merged commit cc4bdd6 into adambullmer:master Nov 12, 2019
@adambullmer
Copy link
Owner

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
Copy link
Contributor Author

Congratulations @adambullmer 🎉

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

Successfully merging this pull request may close these issues.

2 participants