-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
43 lines (37 loc) · 1.04 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 MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
mode:"production",
entry: './js/app.js',
output: {
filename: './js/app_bundle.js',
path: __dirname,
},
plugins: [new MiniCssExtractPlugin({
filename: "./css/css_bundle.css"
}
)],
module: {
rules: [
{
test: /\.scss$/i,
use: [
// could replace the next line with "style-loader" here for inline css
MiniCssExtractPlugin.loader,
"css-loader",
"postcss-loader",
// according to the docs, sass-loader should be at the bottom, which
// loads it first to avoid prefixes in your sourcemaps and other issues.
"sass-loader",
],
},
{
test: /\.js$/,
exclude: /node_modules/,
use: {
// without additional settings, this will reference .babelrc
loader: "babel-loader",
},
},
],
},
};