mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-10 00:59:47 -06:00
* chore: upgrade webpack dependencies to latest sub 5 compat [run ci] * chore: updating v8 snapshot cache * chore: updating v8 snapshot cache * chore: updating v8 snapshot cache * chore: build binaries [run ci] * chore: update snapshot for darwin * chore: downgrade tsconfig-paths-webpack-loader from v4 to v3 [run ci] * [run ci] * chore: add rimraf in @packages/runner to use in prebuild command to clear out dist directory to get windows compat [run ci] * don't pass -rf flags into rimraf as it is inherit with the command --------- Co-authored-by: cypress-bot[bot] <+cypress-bot[bot]@users.noreply.github.com>
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import { getCommonConfig, HtmlWebpackPlugin, getCleanWebpackPlugin } from '@packages/web-config/webpack.config.base'
|
|
import path from 'path'
|
|
import type { Configuration } from 'webpack'
|
|
|
|
const CleanWebpackPlugin = getCleanWebpackPlugin()
|
|
|
|
// @ts-ignore
|
|
const config: 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'),
|
|
inject: false,
|
|
}),
|
|
new CleanWebpackPlugin({ cleanStaleWebpackAssets: false }),
|
|
]
|
|
|
|
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
|