forked from cypress-io/cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.ts
38 lines (34 loc) · 916 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
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: {
reporter: [path.resolve(__dirname, 'src')],
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
devtoolModuleFilenameTemplate: 'cypress://[namespace]/[resource-path]',
},
}
// @ts-ignore
config.plugins = [
// @ts-ignore
...config.plugins,
new HtmlWebpackPlugin({
template: path.resolve(__dirname, 'static/index.html'),
}),
]
config.resolve = {
...config.resolve,
alias: {
'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