Skip to content

Commit

Permalink
packaging improvement, use swc instead
Browse files Browse the repository at this point in the history
  • Loading branch information
sphinxrave committed Jun 30, 2024
1 parent 564ae44 commit e5b500e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
19 changes: 10 additions & 9 deletions packages/react/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"@iconify/json": "^2.2.220",
"@rollup/plugin-dynamic-import-vars": "^2.1.2",
"@rollup/plugin-yaml": "^4.1.2",
"@swc-jotai/debug-label": "^0.1.0",
"@swc-jotai/debug-label": "^0.1.1",
"@types/node": "^20.11.17",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
Expand All @@ -101,7 +101,7 @@
"@typescript-eslint/eslint-plugin": "^7.10.0",
"@typescript-eslint/parser": "^7.10.0",
"@unocss/eslint-config": "^0.60.3",
"@vitejs/plugin-react": "^4.3.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.19",
"browserslist": "^4.23.0",
Expand Down Expand Up @@ -130,4 +130,4 @@
"unocss-preset-autoprefixer": "^0.0.7",
"vite": "^5.2.13"
}
}
}
17 changes: 7 additions & 10 deletions packages/react/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { defineConfig, PluginOption } from "vite";

// Faster React using swc apparently, but can't use it atm.
import react from "@vitejs/plugin-react";
// import react from "@vitejs/plugin-react-swc"; //currently borked.
// import react from "@vitejs/plugin-react";
import react from "@vitejs/plugin-react-swc"; //currently borked.
/* sadly broken due to https://github.com/pmndrs/swc-jotai/issues/22 */

import yaml from "@rollup/plugin-yaml";
Expand Down Expand Up @@ -30,7 +30,7 @@ export default defineConfig({
"ffmpeg.min.js",
],
output: {
experimentalMinChunkSize: 10000,
experimentalMinChunkSize: 30000,
},
},
},
Expand Down Expand Up @@ -67,13 +67,10 @@ export default defineConfig({
port: 9821,
}) as unknown as PluginOption,
react({
babel: {
presets: ["jotai/babel/preset"],
},
// plugins: [
// /* ["@swc-jotai/debug-label", {}]
// sadly broken due to https://github.com/pmndrs/swc-jotai/issues/22 */
// ],
// babel: {
// presets: ["jotai/babel/preset"],
// },
plugins: [["@swc-jotai/debug-label", {}]],
}),
UnoCSS({ presets: [presetIcons()] }),
yaml() as unknown as PluginOption,
Expand Down

0 comments on commit e5b500e

Please sign in to comment.