-
Notifications
You must be signed in to change notification settings - Fork 85
Expand file tree
/
Copy pathwebpack.test.config.js
More file actions
53 lines (44 loc) · 1.18 KB
/
webpack.test.config.js
File metadata and controls
53 lines (44 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import path from 'node:path';
import createEsmUtils from 'esm-utils';
const { __dirname } = createEsmUtils(import.meta);
export default {
entry: {
test: './tests/integration/test-app/test-app.js',
'create-parser': './src/slang-utils/create-parser.js',
'variant-coverage': './variant-coverage/index.js'
},
mode: 'production',
bail: true,
optimization: { minimize: false },
target: ['browserslist'],
externals: { 'node:fs/promises': 'import node:fs/promises' },
resolve: {
extensions: ['.ts', '.js'],
extensionAlias: { '.js': ['.js', '.ts'] }
},
module: {
rules: [
{
test: /\.ts$/,
use: [
{
loader: 'ts-loader',
// This test file includes the variant-coverage directory, which is not included in the main tsconfig.json
options: { configFile: 'tsconfig.test.json' }
}
],
exclude: /node_modules/
}
]
},
experiments: { outputModule: true },
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
library: { type: 'module' }
},
performance: {
maxEntrypointSize: 1024 * 1024,
maxAssetSize: 1024 * 1024
}
};