UNPKG

browser-plugin-creator

Version:

A modern scaffolding tool for creating browser extensions with ease

38 lines (37 loc) 825 B
const path = require('path'); const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { mode: 'development', entry: { devtools: './devtools.js', background: './background.js', content: './content.js' }, output: { path: path.resolve(__dirname, 'dist'), filename: '[name].js', clean: true }, module: { rules: [ { test: /\.css$/, use: ['style-loader', 'css-loader'] }, { test: /\.(png|jpg|jpeg|gif|svg)$/, type: 'asset/resource' } ] }, plugins: [ new CopyWebpackPlugin({ patterns: [ { from: 'manifest.json', to: 'manifest.json' }, { from: 'devtools.html', to: 'devtools.html' }, { from: 'devtools.css', to: 'devtools.css' } ] }) ], devtool: 'source-map' };