Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Remirror v3 decorator #2

Merged
merged 1 commit into from
Aug 1, 2024
Merged

Conversation

ocavue
Copy link

@ocavue ocavue commented Aug 1, 2024

This PR includes multiple changes so that Remirror v3 decorator (i.e. JavaScript Stage-3 decorator) can work.

  1. Update Storybook. The previous Storybook is using esbuild 0.20, which doesn't support Stage-3 decorator.
  2. Set experimentalDecorators to false in tsconfig.json.
  3. Replace @vitejs/plugin-react-swc with @vitejs/plugin-react.@vitejs/plugin-react-swc doesn't support Stage-3 decorator yet. Check this issue for more details: Support TC39 decorators (TS 5, esbuild 0.21, Vite 5.3) vitejs/vite-plugin-react-swc#86
  4. Add esbuild: { target: 'ES2020' } in vite.config.ts. Vite doesn't transpile by default during dev mode and the browsers don't support decorator yet.
image

@r1nzai r1nzai merged commit 6ed07aa into r1nzai:rte-repro Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants