mirror of
https://github.com/cypress-io/cypress.git
synced 2026-04-30 12:01:06 -05:00
41 lines
971 B
TypeScript
41 lines
971 B
TypeScript
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
|