-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.development.js
40 lines (39 loc) · 1.39 KB
/
webpack.development.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
const path = require("path");
const common = require('./webpack.common');
const merge = require('webpack-merge');
const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
module.exports = merge(common, {
devtool: "none", // avoid eval statements
mode: "development",
plugins: [new ExtractCssChunks()],
module: {
rules: [
{
test: /\.scss$/i,
use: [ExtractCssChunks.loader, 'css-loader', 'sass-loader'],
},
{
test: /\.(svg|png|jpg|jpeg|gif|ttf|woff2|woff|eot)$/i,
use: [
{
loader: "file-loader",
options: {
name: "[path][name].[ext]",
context: path.resolve(__dirname, "src/"),
outputPath: ".",
publicPath: ".",
useRelativePaths: true
}
},
// {
// loader: 'image-webpack-loader',
// options: {
// bypassOnDebug: true, // webpack@1.x
// disable: true, // webpack@2.x and newer
// },
// }
]
}
],
}
});