-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.ts
More file actions
31 lines (28 loc) · 749 Bytes
/
webpack.dev.ts
File metadata and controls
31 lines (28 loc) · 749 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
import type { Configuration as DevServerConfiguration } from 'webpack-dev-server'
import { merge } from 'webpack-merge'
import * as path from 'path'
import * as webpack from 'webpack'
import common from './webpack.common'
const devServer: DevServerConfiguration = {
static: {
directory: path.join(__dirname, 'assets'),
publicPath: '/',
},
historyApiFallback: true,
compress: true,
port: 9000,
hot: true,
open: true,
}
const config: webpack.Configuration = {
mode: 'development',
devtool: 'inline-source-map',
plugins: [
new webpack.DefinePlugin({
PRODUCTION: JSON.stringify(false),
'process.env.NODE_ENV': JSON.stringify('development'),
}),
],
devServer,
}
export default merge(common, config)