-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
39 lines (38 loc) · 1.12 KB
/
webpack.dev.js
File metadata and controls
39 lines (38 loc) · 1.12 KB
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
const path = require("path");
const APP = path.resolve(__dirname);
const { merge } = require("webpack-merge");
const common = require("./webpack.common.js");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const webpack = require("webpack");
module.exports = merge(common, {
mode: "development",
// Use 'eval-source-map' for faster builds, or 'source-map' for better quality
// 'source-map' provides the best debugging experience for library code
devtool: "source-map",
module: {
rules: [
{
test: /\.css$/,
use: ["style-loader", "css-loader?url=false"],
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: "./webpack/index.ejs",
filename: path.join(APP, "..", "web", "assets", "index.html"),
inject: "body",
}),
new webpack.DefinePlugin({
WEBPACK_MODE: JSON.stringify("development"),
VERSION: JSON.stringify(process.env.npm_package_version),
SENTRY_DSN: JSON.stringify(undefined),
}),
],
resolve: {
fallback: {
path: false,
fs: false,
},
},
});