Skip to content

Commit

Permalink
Merge pull request #506 from ckeditor/fix-jsx-runtime
Browse files Browse the repository at this point in the history
Fix: Change JSX runtime to `classic` so that `react-jsx-runtime` is not bundled.
  • Loading branch information
pomek authored Jul 17, 2024
2 parents b259831 + ac00731 commit e65de14
Show file tree
Hide file tree
Showing 6 changed files with 237 additions and 290 deletions.
2 changes: 1 addition & 1 deletion demos/multiroot-react/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Demo = 'editor' | 'rich' | 'context';
const multiRootEditorContent = {
intro: '<h2>Sample</h2><p>This is an instance of the ' +
'<a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/overview.html#classic-editor">multi-root editor build</a>.</p>',
content: '<p>It is the custom content</p><figure class="image"><img src="/sample.jpg" alt="CKEditor 5 Sample image."></figure>',
content: '<p>It is the custom content</p><figure class="image"><img src="/demos/sample.jpg" alt="CKEditor 5 Sample image."></figure>',
outro: '<p>You can use this sample to validate whether your ' +
'<a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/custom-builds.html">custom build</a> works fine.</p>'
};
Expand Down
2 changes: 1 addition & 1 deletion demos/react/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const editorContent = `
classic editor build</a>.
</p>
<figure class="image">
<img src="/sample.jpg" alt="CKEditor 5 Sample image." />
<img src="/demos/sample.jpg" alt="CKEditor 5 Sample image." />
</figure>
<p>You can use this sample to validate whether your
<a href="https://ckeditor.com/docs/ckeditor5/latest/builds/guides/development/custom-builds.html">custom build</a> works fine.</p>
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@testing-library/react": "^16.0.0",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitest/browser": "^2.0.0",
"@vitest/coverage-istanbul": "^2.0.0",
"@vitest/ui": "^2.0.0",
Expand Down
6 changes: 4 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { resolve } from 'path';
import { createRequire } from 'module';
import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react-swc';
import react from '@vitejs/plugin-react';

const require = createRequire( import.meta.url );
const pkg = require( './package.json' );
Expand All @@ -15,9 +15,11 @@ const REACT_VERSION = Number( process.env.REACT_VERSION ) || 18;

export default defineConfig( {
plugins: [
react()
react( { jsxRuntime: 'classic' } )
],

publicDir: false,

build: {
minify: false,
sourcemap: true,
Expand Down
Loading

0 comments on commit e65de14

Please sign in to comment.