42 lines
809 B
JavaScript
42 lines
809 B
JavaScript
const path = require("path");
|
|
const { optimize } = require("webpack");
|
|
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
|
|
|
module.exports = {
|
|
entry: {
|
|
background: "./background/background.js",
|
|
popup: "./popup/popup.js",
|
|
options: "./options/options.js"
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, "addon"),
|
|
filename: "[name]/[name].js"
|
|
},
|
|
mode: "none",
|
|
watch: false,
|
|
watchOptions: {
|
|
ignored: '**/node_modules',
|
|
},
|
|
optimization: {
|
|
minimize: false
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.s[ac]ss$/i,
|
|
use: [
|
|
// Creates `style` nodes from JS strings
|
|
"style-loader",
|
|
// Translates CSS into CommonJS
|
|
"css-loader",
|
|
// Compiles Sass to CSS
|
|
"sass-loader",
|
|
],
|
|
},
|
|
],
|
|
},
|
|
plugins: [
|
|
new BundleAnalyzerPlugin()
|
|
]
|
|
}
|