mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-19 13:39:56 -06:00
* pull support for JIT from vite since it doesn't have an affect for end users or performance (webpack only) [run ci] rebase this * remove the experimentalJIT flag and make it GA (default still false) [run ci] * enable justInTimeCompile by default [run ci] * chore: bump cache [run ci]
33 lines
866 B
JavaScript
33 lines
866 B
JavaScript
const path = require('path')
|
|
|
|
module.exports = ({ mode } = { mode: 'production' }) => {
|
|
return {
|
|
mode,
|
|
// so we don't get variable module output when comparing snapshots in system-tests
|
|
stats: 'errors-only',
|
|
// stats: 'normal', // if debugging JIT
|
|
resolve: {
|
|
extensions: ['.js', '.ts', '.jsx', '.tsx'],
|
|
alias: {
|
|
'react': path.resolve(__dirname, './node_modules/react'),
|
|
'react-dom': path.resolve(__dirname, './node_modules/react-dom'),
|
|
},
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.(js|jsx)$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ['@babel/preset-env', '@babel/preset-react'],
|
|
plugins: ['@babel/plugin-syntax-jsx'],
|
|
},
|
|
},
|
|
},
|
|
],
|
|
},
|
|
}
|
|
}
|