generated from DevUnltd/js-library-boilerplate-basic
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.demo.js
More file actions
50 lines (49 loc) · 989 Bytes
/
webpack.config.demo.js
File metadata and controls
50 lines (49 loc) · 989 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
41
42
43
44
45
46
47
48
49
50
const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
module.exports = {
mode: "development",
devtool: 'cheap-module-source-map',
entry: './src/demo/index.ts',
output: {
filename: 'index.js',
},
optimization: {
minimize: false,
},
devServer: {
open: true,
hot: true,
host: "localhost",
port: 9000
},
module: {
rules: [
{
test: /\.(m|j|t)s$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader'
}
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
]
},
plugins: [
new HtmlWebpackPlugin({
filename: "index.html",
template: "./templates/index.html",
inject: false
}),
new HtmlWebpackPlugin({
filename: "badge.html",
template: "./templates/badge.html",
inject: false
}),
],
resolve: {
extensions: ['.ts', '.js', '.json']
}
};