-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.development.config.js
66 lines (65 loc) · 1.31 KB
/
webpack.development.config.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
const path = require('path');
const webpack = require('webpack');
const TsConfigWebpackPlugin = require('ts-config-webpack-plugin');
const ScssConfigWebpackPlugin = require('scss-config-webpack-plugin');
const FontConfigWebpackPlugin = require('font-config-webpack-plugin');
/**
* @type import('webpack').Configuration
*/
module.exports = {
entry: {
app: [
path.resolve(__dirname, 'src', 'Frontend', 'App.tsx')
]
},
output: {
filename: '[name].js',
publicPath: '/js/'
},
resolve: {
extensions: [
'.ts',
'.tsx',
'.js'
]
},
mode: 'development',
optimization: {
usedExports: true,
sideEffects: false
},
devtool: 'inline-source-map',
plugins: [
new webpack.EnvironmentPlugin({
NODE_ENV: 'development'
}),
new TsConfigWebpackPlugin({
configFile: 'tsconfig.compilation.json'
}),
new ScssConfigWebpackPlugin(),
new FontConfigWebpackPlugin()
],
devServer: {
host: '0.0.0.0',
port: 4000,
compress: false,
historyApiFallback: true,
inline: true,
disableHostCheck: true,
proxy: {
'/': {
target: 'http://localhost:3000',
secure: false
}
},
watchOptions: {
poll: 1000,
ignored: [
'node_modules'
]
},
stats: {
color: true
}
}
};