Skip to content

Commit a65ff55

Browse files
committed
feat: allow for @cypress/webpack-batteries-included-preprocessor to fully resolve the user tsconfig compiler options
1 parent 1d2a26a commit a65ff55

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

npm/vite-dev-server/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"resolveJsonModule": true,
55
"target": "ES2017" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */,
66
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
7+
"moduleResolution": "node",
78
"lib": [
89
"es2015",
910
"dom"

npm/webpack-batteries-included-preprocessor/index.js

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ const addTypeScriptConfig = (file, options) => {
5050
loader: require.resolve('ts-loader'),
5151
options: {
5252
compiler: options.typescript,
53+
// pass in the resolved compiler options from the tsconfig file into ts-loader to most accurately transpile the code
54+
...(configFile ? {
55+
compilerOptions: configFile.config.compilerOptions,
56+
} : {}),
5357
logLevel: 'error',
5458
silent: true,
5559
transpileOnly: true,

npm/webpack-dev-server/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"resolveJsonModule": true,
55
"target": "ES2017" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */,
66
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
7+
"moduleResolution": "node",
78
"lib": [
89
"es2015",
910
"dom"

0 commit comments

Comments
 (0)