-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
43 lines (40 loc) · 1.26 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const path = require('path');
const BundleTracker = require('webpack-bundle-tracker');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
// check if we are in production mode, make sure to set this in your environment
const isDevelopment = (process.env.DEBUG || "false").toLowerCase() === "true";
module.exports = {
target: 'web',
mode: 'development',
entry: {
// bootstrap_css: './static/css/bootstrap.min.css',
index : './static/index/',
base : './static/dashboard/base.js',
extra : './static/dashboard/extra.js',
authentication : './static/authentication/index.js',
},
plugins : [
new BundleTracker({filename: './webpack-stats.json'}),
],
module: {
rules: [
{
test: /\.css$/,
use: [
'style-loader', 'css-loader',
]
},
{
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
type: 'asset',
generator: {
filename: 'fonts/en/[hash][ext][query]',
},
}
]
},
output: {
filename: '[name].bundle.js',
path: path.resolve(__dirname, './static/bundles'),
}
}