Skip to content

Instantly share code, notes, and snippets.

@AnandShiva
Last active September 13, 2020 11:54
Show Gist options
  • Save AnandShiva/0662772333303faeb1101d0388feafe5 to your computer and use it in GitHub Desktop.
Save AnandShiva/0662772333303faeb1101d0388feafe5 to your computer and use it in GitHub Desktop.
Vue Extension medium example - webpack.config.js
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const ExtensionReloader = require('webpack-extension-reloader');
module.exports = {
context: path.resolve(__dirname, 'src'),
entry: {
'newTab': './newTab.js',
'background': './background.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
},
plugins: [
new ExtensionReloader({
manifest: path.resolve(__dirname,'src', "manifest.json"),
entries: {
background: 'background' // *REQUIRED
}
}),
new CopyPlugin({
patterns: [
{ from: 'manifest.json', to: 'manifest.json' },
{ from: 'newTab.html', to: 'newTab.html' }
],
}),
],
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment