-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
26 lines (25 loc) · 773 Bytes
/
webpack.dev.js
File metadata and controls
26 lines (25 loc) · 773 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
const { merge } = require("webpack-merge");
const common = require("./webpack.common.js");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const path = require("path");
module.exports = merge(common, {
entry: {
app: "./demo/sample.ts",
},
plugins: [
new HtmlWebpackPlugin({
template: "./demo/sample.html",
}),
],
mode: "development",
devtool: "inline-source-map", // Useful for debugging
devServer: {
static: {
directory: path.resolve(__dirname, "demo"), // Replaces contentBase
},
port: 8081,
open: true, // Automatically open the browser
hot: true, // Enable Hot Module Replacement
compress: true, // Enable gzip compression
},
});