fix: enable cjs interop while we migrate packages (#2034)

This commit is contained in:
Carlos Valente
2026-03-25 10:49:43 +01:00
committed by GitHub
parent 1c78397f18
commit 7d469038bf
2 changed files with 8 additions and 2 deletions
@@ -1,8 +1,9 @@
import { memo } from 'react';
import Editor from 'react-simple-code-editor';
import Prism from 'virtual:prismjs';
import 'prismjs/components/prism-css';
import 'prismjs/themes/prism-tomorrow.min.css';
import Prism from 'virtual:prismjs';
import style from './StyleEditor.module.scss';
interface CodeEditorProps {
+5
View File
@@ -17,6 +17,11 @@ const ReactCompilerConfig = {
export default defineConfig({
base: './', // Ontime cloud: we use relative paths to allow them to reference a dynamic base set at runtime
legacy: {
// Temporary compatibility for CJS packages affected by Vite 8 interop changes.
// ie: react-simple-code-editor
inconsistentCjsInterop: true,
},
define: {
// we pass along the NODE_ENV here in case it is a docker build
'import.meta.env.IS_DOCKER': process.env.NODE_ENV === 'docker',