Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Commit

Permalink
fix: handle JSX correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
mxdvl committed Oct 28, 2022
1 parent edde2a7 commit d1ca477
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/nasty-plums-enjoy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@guardian/discussion-rendering': patch
---

Fix Emotion class names
7 changes: 6 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ const outDir = pkg.module.split('/')[0];

// https://vitejs.dev/config/
export default defineConfig({
esbuild: {
jsxFactory: 'jsx',
jsxImportSource: '@emotion/react',
jsxInject: `import { jsx } from '@emotion/react';`,
},
plugins: [
react({
jsxRuntime: 'classic',
babel: {
plugins: ['@emotion/babel-plugin'],
plugins: ['@emotion'],
},
}),
],
Expand Down

0 comments on commit d1ca477

Please sign in to comment.