forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.ts
40 lines (36 loc) · 971 Bytes
/
webpack.config.ts
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
import getCommonConfig, { HtmlWebpackPlugin } from '@packages/web-config/webpack.config.base'
import path from 'path'
import webpack from 'webpack'
// @ts-ignore
const config: webpack.Configuration = {
...getCommonConfig(),
entry: {
app: [require.resolve('@babel/polyfill'), path.resolve(__dirname, 'src/main')],
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
},
}
// @ts-ignore
config.plugins = [
// @ts-ignore
...config.plugins,
new HtmlWebpackPlugin({
template: path.resolve(__dirname, './src/index.html'),
env: process.env.NODE_ENV,
inject: false,
}),
]
config.resolve = {
...config.resolve,
alias: {
'bluebird': require.resolve('bluebird'),
'lodash$': require.resolve('lodash'),
'mobx': require.resolve('mobx'),
'mobx-react': require.resolve('mobx-react'),
'react': require.resolve('react'),
'react-dom': require.resolve('react-dom'),
},
}
export default config