mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-08 07:49:12 +00:00
fix: enable cjs interop while we migrate packages (#2034)
This commit is contained in:
+3
-2
@@ -1,8 +1,9 @@
|
|||||||
import { memo } from 'react';
|
import { memo } from 'react';
|
||||||
import Editor from 'react-simple-code-editor';
|
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 'prismjs/themes/prism-tomorrow.min.css';
|
||||||
|
import Prism from 'virtual:prismjs';
|
||||||
|
|
||||||
import style from './StyleEditor.module.scss';
|
import style from './StyleEditor.module.scss';
|
||||||
|
|
||||||
interface CodeEditorProps {
|
interface CodeEditorProps {
|
||||||
|
|||||||
@@ -17,6 +17,11 @@ const ReactCompilerConfig = {
|
|||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: './', // Ontime cloud: we use relative paths to allow them to reference a dynamic base set at runtime
|
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: {
|
define: {
|
||||||
// we pass along the NODE_ENV here in case it is a docker build
|
// we pass along the NODE_ENV here in case it is a docker build
|
||||||
'import.meta.env.IS_DOCKER': process.env.NODE_ENV === 'docker',
|
'import.meta.env.IS_DOCKER': process.env.NODE_ENV === 'docker',
|
||||||
|
|||||||
Reference in New Issue
Block a user