mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-07 04:23:40 +09:00
Babel is very big package. It brings a lot of transitive dependencies. A lot of projects like remix, storybook and jest depends on it. Updating it is always a challenge because it usually lead to duplicates. So here I switched to acorn we already use for expressions. JSX parsing is not builtin but available as a plugin. The only downside is lack of node types. Though very straightforward to get them from jsx estree extension spec. See build sizes change ```diff - 4716 build/server + 3992 build/server 6096 build/client ``` Additionally in this PR prevented "Fragment" component generation, it should not be used with anything except Slot.
42 lines
1.1 KiB
JSON
42 lines
1.1 KiB
JSON
{
|
|
"private": true,
|
|
"name": "@webstudio-is/jsx-utils",
|
|
"version": "0.0.0",
|
|
"description": "Utilities to convert JSX to Webstudio",
|
|
"author": "Webstudio <github@webstudio.is>",
|
|
"homepage": "https://webstudio.is",
|
|
"type": "module",
|
|
"scripts": {
|
|
"typecheck": "tsc",
|
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
"checks": "pnpm typecheck && pnpm test"
|
|
},
|
|
"devDependencies": {
|
|
"@jest/globals": "^29.7.0",
|
|
"@webstudio-is/jest-config": "workspace:^",
|
|
"@webstudio-is/tsconfig": "workspace:^",
|
|
"fast-glob": "^3.2.12",
|
|
"type-fest": "^4.3.1",
|
|
"typescript": "5.4.5"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"webstudio": "./src/index.ts"
|
|
},
|
|
"./index.server": {
|
|
"webstudio": "./src/index.server.ts"
|
|
}
|
|
},
|
|
"license": "AGPL-3.0-or-later",
|
|
"sideEffects": false,
|
|
"dependencies": {
|
|
"@webstudio-is/css-data": "workspace:*",
|
|
"@webstudio-is/react-sdk": "workspace:*",
|
|
"@webstudio-is/sdk": "workspace:*",
|
|
"acorn": "^8.11.3",
|
|
"acorn-jsx": "^5.3.2",
|
|
"json5": "^2.2.3",
|
|
"zod": "^3.22.4"
|
|
}
|
|
}
|