-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathwebpack.dev.config.js
More file actions
40 lines (39 loc) · 878 Bytes
/
webpack.dev.config.js
File metadata and controls
40 lines (39 loc) · 878 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
39
40
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
mode: 'development',
entry: { fibonacci: './src/fibonacci.js' },
plugins: [new MiniCssExtractPlugin()],
module: {
rules: [
{
test: /\.s[ac]ss$/i,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: { import: false }
},
'sass-loader',
],
},
{
test: /\.js[x]?$/,
exclude: /(node_modules)/,
use: {
loader: 'babel-loader'
}
}
]
},
resolve: {
modules: [path.resolve(__dirname), 'node_modules'],
extensions: ['.js', '.json', '.css', '.scss', '.sass']
},
devServer: {
static: {
directory: path.resolve(__dirname, 'src')
}
},
devtool: 'source-map'
};