mirror of
https://github.com/anatolykopyl/vk-mute.git
synced 2026-03-26 12:55:13 +00:00
Refactoring and add build-tools
This commit is contained in:
40
webpack.config.js
Normal file
40
webpack.config.js
Normal file
@@ -0,0 +1,40 @@
|
||||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
mode: "development",
|
||||
devtool: "inline-source-map",
|
||||
entry: {
|
||||
dom: './src/dom/main.js',
|
||||
background: './src/background/background.js',
|
||||
popup: './src/popup/popup.js'
|
||||
},
|
||||
output: {
|
||||
filename: '[name].js',
|
||||
path: path.resolve(__dirname, 'extension/dist')
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.m?js$/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['@babel/preset-env']
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.css$/i,
|
||||
use: ['style-loader', 'css-loader'],
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [new HtmlWebpackPlugin({
|
||||
template: "./src/popup/popup.html",
|
||||
filename: "popup.html",
|
||||
chunks: ['popup']
|
||||
})]
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user