Skip to content

Commit 1abdc43

Browse files
Pollepsjoepio
authored andcommitted
Switch to react-swc
1 parent 4336d73 commit 1abdc43

File tree

5 files changed

+243
-142
lines changed

5 files changed

+243
-142
lines changed

browser/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ publish
55
.env
66
.husky
77
.nohup
8+
.swc
89
*/lib
910
*/dist
1011
*/dev-dist

browser/data-browser/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,10 @@
4545
"yamde": "^1.7.1"
4646
},
4747
"devDependencies": {
48+
"@swc/plugin-styled-components": "^1.5.110",
4849
"@types/react-pdf": "^6.2.0",
4950
"@types/react-window": "^1.8.7",
50-
"babel-plugin-styled-components": "^2.1.4",
51+
"@vitejs/plugin-react-swc": "^3.5.0",
5152
"csstype": "^3.1.0",
5253
"gh-pages": "^3.1.0",
5354
"lint-staged": "^10.5.4",

browser/data-browser/vite.config.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
11
import { defineConfig } from 'vite';
2-
import react from '@vitejs/plugin-react';
2+
import react from '@vitejs/plugin-react-swc';
33
import { VitePWA } from 'vite-plugin-pwa';
44
import webfontDownload from 'vite-plugin-webfont-dl';
55

66
export default defineConfig({
77
plugins: [
88
webfontDownload(),
9-
react({
10-
babel: {
11-
plugins: [
12-
[
13-
'babel-plugin-styled-components',
14-
{
15-
fileName: false,
16-
},
17-
],
18-
],
19-
},
20-
}),
9+
react({ plugins: [['@swc/plugin-styled-components', {}]] }),
2110
VitePWA({
2211
registerType: 'autoUpdate',
2312
devOptions: {

browser/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
"@jest/globals": "^29.3.1",
55
"@types/chai": "^4.2.22",
66
"@types/jest": "^27.0.2",
7-
"@types/node": "^16.11.4",
7+
"@types/node": "^20.11.5",
88
"@types/react": "^18.2.34",
99
"@types/react-dom": "^18.2.14",
1010
"@types/react-router-dom": "^5.3.3",
1111
"@typescript-eslint/eslint-plugin": "^5.9.0",
1212
"@typescript-eslint/parser": "^5.9.0",
13-
"@vitejs/plugin-react": "^1.3.0",
1413
"chai": "^4.3.4",
1514
"eslint": "8.23.0",
1615
"eslint-config-prettier": "^8.3.0",

0 commit comments

Comments
 (0)