Files
react-test/test/e2e/webpack.config.js
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

46 lines
1.1 KiB
JavaScript

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpackBaseConfig = require('../../webpackBaseConfig');
module.exports = {
...webpackBaseConfig,
entry: path.resolve(__dirname, 'index.js'),
mode: process.env.NODE_ENV || 'development',
optimization: {
// Helps debugging and build perf.
// Bundle size is irrelevant for local serving
minimize: false,
},
output: {
path: path.resolve(__dirname, './build'),
publicPath: '/',
filename: 'tests.js',
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, './template.html'),
}),
],
module: {
...webpackBaseConfig.module,
rules: [
{
test: /\.(js|ts|tsx)$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: {
cacheDirectory: true,
configFile: path.resolve(__dirname, '../../babel.config.mjs'),
envName: 'regressions',
},
},
{
test: /\.(jpg|gif|png)$/,
type: 'asset/inline',
},
],
},
// TODO: 'browserslist:modern'
target: 'web',
};