Skip to content

Commit ce3b830

Browse files
committed
remove wdio remnants from webpack config
1 parent 5cb9f4c commit ce3b830

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

webpack.config.js

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
'use strict';
33
const path = require('path');
44
const webpack = require('webpack');
5-
// eslint-disable-next-line n/no-unpublished-require
5+
// eslint-disable-next-line @typescript-eslint/naming-convention
66
const ESLintPlugin = require('eslint-webpack-plugin');
77

88
/** @typedef {import('webpack').Configuration} WebpackConfig */
@@ -32,35 +32,26 @@ const extensionConfig = (env, argv) => ({
3232
rules: [
3333
{
3434
test: /\.ts$/,
35-
exclude: [/node_modules/, /wdio\.conf\.mts/], // Exclude WDIO config
36-
use: env['coverage']
37-
? [
38-
{ loader: '@jsdevtools/coverage-istanbul-loader' }, // Add coverage for WDIO
39-
{ loader: 'ts-loader' },
40-
]
41-
: [{ loader: 'ts-loader' }],
35+
exclude: [/node_modules/],
36+
use: [{ loader: 'ts-loader' }],
4237
},
4338
],
4439
},
4540
plugins: [
46-
new ESLintPlugin(), // Optional: Enforce code quality
41+
new ESLintPlugin(),
4742
new webpack.optimize.LimitChunkCountPlugin({
48-
maxChunks: 1, // Ensure single bundle for extension
49-
}),
50-
new webpack.DefinePlugin({
51-
'process.env.TESTING': JSON.stringify(env['wdio'] || false), // Flag for WDIO testing
52-
'process.env.COVERAGE': JSON.stringify(env['coverage'] || false), // Flag for coverage
43+
maxChunks: 1,
5344
}),
5445
],
5546
cache: {
56-
type: 'filesystem',
57-
name: argv.mode + '-wdio_' + env['wdio'] + '-coverage_' + env['coverage'],
58-
version: '1',
47+
type: 'filesystem',
48+
name: argv.mode || 'default',
49+
version: '1',
5950
},
6051
devtool: 'nosources-source-map',
6152
infrastructureLogging: {
6253
level: 'log',
6354
},
6455
});
6556

66-
module.exports = [extensionConfig];
57+
module.exports = [extensionConfig];

0 commit comments

Comments
 (0)