-
Notifications
You must be signed in to change notification settings - Fork 76
/
webpack.dev.js
31 lines (29 loc) · 894 Bytes
/
webpack.dev.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
const path = require('path');
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackTagsPlugin = require('html-webpack-tags-plugin');
const webpack = require('webpack');
module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
devServer: {
historyApiFallback: true,
port: 9000,
open: true
},
plugins: [
new HTMLWebpackPlugin({
// template: path.resolve(__dirname, 'src/dev-bootstrap4.html')
template: path.resolve(__dirname, 'src/dev-bootstrap5.html')
// template: path.resolve(__dirname, 'src/dev-bulma.html')
// template: path.resolve(__dirname, 'src/dev-foundation6.html')
}),
new HtmlWebpackTagsPlugin({
scripts: [{
sourcePath: path.resolve(__dirname, 'src/dev-data.js'),
path: 'dev-data.js'
}]
})
]
});