diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-09-16 16:12:34 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-09-20 15:55:26 +0200 |
| commit | 0c8a5ecc98887d00d3c7ba3487157b92cea54f57 (patch) | |
| tree | 8d527db32aacbb23ad2495bd124d703594417b71 | |
| parent | deaf60d22b41f2b985dbaf54adde76c5dac5e28a (diff) | |
| download | mullvadvpn-0c8a5ecc98887d00d3c7ba3487157b92cea54f57.tar.xz mullvadvpn-0c8a5ecc98887d00d3c7ba3487157b92cea54f57.zip | |
Switch to new JSX transform
| -rw-r--r-- | gui/.eslintrc.js | 1 | ||||
| -rw-r--r-- | gui/tasks/scripts.js | 9 | ||||
| -rw-r--r-- | gui/tsconfig.dev.json | 6 | ||||
| -rw-r--r-- | gui/tsconfig.json | 2 |
4 files changed, 16 insertions, 2 deletions
diff --git a/gui/.eslintrc.js b/gui/.eslintrc.js index 02e377d84a..3e39fbd5d9 100644 --- a/gui/.eslintrc.js +++ b/gui/.eslintrc.js @@ -69,6 +69,7 @@ module.exports = { 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react/recommended', + 'plugin:react/jsx-runtime', ], settings: { react: { diff --git a/gui/tasks/scripts.js b/gui/tasks/scripts.js index ec38c7c3fa..36b9def82d 100644 --- a/gui/tasks/scripts.js +++ b/gui/tasks/scripts.js @@ -41,7 +41,14 @@ function makeWatchCompiler(onFirstSuccess, onSuccess) { } }), ); - watch.start('--noClear', '--sourceMap', '--inlineSources', '--incremental', '--project', '.'); + watch.start( + '--noClear', + '--sourceMap', + '--inlineSources', + '--incremental', + '--project', + './tsconfig.dev.json', + ); return watch.tsc; }; compileScripts.displayName = 'compile-scripts-watch'; diff --git a/gui/tsconfig.dev.json b/gui/tsconfig.dev.json new file mode 100644 index 0000000000..91873fa1d1 --- /dev/null +++ b/gui/tsconfig.dev.json @@ -0,0 +1,6 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "jsx": "react-jsxdev" + } +} diff --git a/gui/tsconfig.json b/gui/tsconfig.json index fc393219d2..88018eb4ff 100644 --- a/gui/tsconfig.json +++ b/gui/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "alwaysStrict": true, "esModuleInterop": true, - "jsx": "react", + "jsx": "react-jsx", "module": "commonjs", "noImplicitReturns": true, "noUnusedLocals": true, |
