adding webpack
This commit is contained in:
parent
46feb5705e
commit
4c93c0be94
33
webpack.config.js
Normal file
33
webpack.config.js
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
const path = require("path");
|
||||||
|
const TerserPlugin = require("terser-webpack-plugin");
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
entry: "./scripts/module.js",
|
||||||
|
output: {
|
||||||
|
filename: "./index.js",
|
||||||
|
path: path.resolve(__dirname),
|
||||||
|
},
|
||||||
|
mode: "production",
|
||||||
|
devtool: "source-map",
|
||||||
|
optimization: {
|
||||||
|
minimizer: [
|
||||||
|
new TerserPlugin({
|
||||||
|
terserOptions: {
|
||||||
|
keep_classnames: true,
|
||||||
|
keep_fnames: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
exclude: /node_modules/,
|
||||||
|
use: {
|
||||||
|
loader: "babel-loader",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
Loading…
x
Reference in New Issue
Block a user