Files
cypress/system-tests/projects/justInTimeCompile/webpack/webpack.config.js
Bill Glesias 15c5761eb6 breaking: make JustInTimeCompile GA from experimentalJustInTimeCompile and default to true (#30641)
* 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]
2024-11-21 15:25:59 -05:00

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'],
},
},
},
],
},
}
}