forked from Supalosa/InfernoTrainer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
34 lines (32 loc) · 891 Bytes
/
webpack.dev.js
File metadata and controls
34 lines (32 loc) · 891 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
const path = require("path");
const { merge } = require('webpack-merge');
const CopyPlugin = require("copy-webpack-plugin");
const common = require('./webpack.common.js');
// used for dev mode only
module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
entry: './sample/sample.ts',
output: {
filename: "sample.js",
path: path.resolve(__dirname, "dist"),
publicPath: '',
},
devServer: {
contentBase: path.join(__dirname, "_bundles"),
compress: true,
port: 8000,
host: '0.0.0.0',
disableHostCheck: true,
openPage: 'http://localhost:8000/'
},
plugins: [
new CopyPlugin({
patterns: [
{ from: `index.html`, to: "", context: `sample/` },
{ from: `assets/fonts/*.woff`, to: "", context: `src/` },
{ from: `assets/fonts/*.woff2`, to: "", context: `src/` },
],
}),
],
});