-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.config.dev.js
52 lines (51 loc) · 1.31 KB
/
webpack.config.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*********************************************************************
* Copyright (c) Intel Corporation 2020
* SPDX-License-Identifier: Apache-2.0
**********************************************************************/
const HtmlWebpackPlugin = require('html-webpack-plugin')
const webpack = require('webpack')
module.exports = {
mode: 'development',
entry: {
kvm: './src/reactjs/KVM/index.tsx',
sol: './src/reactjs/SerialOverLAN/index.tsx'
},
devServer: {
port: 9000
},
// sourceMap in tsconfig which holds information about your original files when the code is minified
// devtool deal with existing source maps
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: ['ts-loader']
},
{
test: /\.(sc|sa|c)ss$/,
use: ['style-loader', 'css-loader', 'sass-loader']
}
]
},
resolve: {
extensions: ['.tsx', '.ts', '.js']
},
plugins: [
new webpack.ProvidePlugin({
'react': 'react'
}),
new HtmlWebpackPlugin({
filename: 'kvm.htm',
template: './src/reactjs/sample/sampleKVM.htm',
inject: true,
chunks: ['kvm']
}),
new HtmlWebpackPlugin({
filename: 'sol.htm',
template: './src/reactjs/sample/sampleSOL.htm',
inject: true,
chunks: ['sol']
})
]
}