-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
executable file
·38 lines (37 loc) · 876 Bytes
/
webpack.dev.js
File metadata and controls
executable file
·38 lines (37 loc) · 876 Bytes
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
const path = require("path");
const common = require("./webpack.common");
const merge = require("webpack-merge");
const webpack = require('webpack')
module.exports = merge(common, {
mode: "development",
output: {
filename: "[name].js",
path: path.resolve(__dirname, "dist")
},
devServer:{
hot: true,
port: 3000
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
],
module: {
rules: [
{
test: /\.scss$/,
use: [
"style-loader", //4. Injeta CSS no DOM
"css-loader", // 3. De css para vanilla js
{
loader: "postcss-loader", // 2. Adiciona Autoprefixer no CSS
options: {
ident: "postcss",
plugins: [require("autoprefixer")]
}
},
"sass-loader" //1. De SASS para o CSS
]
}
]
}
});