mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(editor): Replace monaco-editor/prismjs with CodeMirror (#5983)
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com> Co-authored-by: Milorad FIlipović <milorad@n8n.io> Co-authored-by: Alex Grozav <alex@grozav.com>
This commit is contained in:
committed by
GitHub
parent
88724bb056
commit
ca4e0df90b
@@ -1,6 +1,5 @@
|
||||
import vue from '@vitejs/plugin-vue2';
|
||||
import legacy from '@vitejs/plugin-legacy';
|
||||
import monacoEditorPlugin from 'vite-plugin-monaco-editor';
|
||||
import path, { resolve } from 'path';
|
||||
import { defineConfig, mergeConfig } from 'vite';
|
||||
import { defineConfig as defineVitestConfig } from 'vitest/config';
|
||||
@@ -73,24 +72,11 @@ const alias = [
|
||||
},
|
||||
];
|
||||
|
||||
// https://github.com/vitest-dev/vitest/discussions/1806
|
||||
if (NODE_ENV === 'test') {
|
||||
alias.push({
|
||||
find: /^monaco-editor$/,
|
||||
replacement: __dirname + '/node_modules/monaco-editor/esm/vs/editor/editor.api',
|
||||
});
|
||||
}
|
||||
|
||||
const plugins = [
|
||||
vue(),
|
||||
legacy({
|
||||
targets: ['>1%', 'last 3 versions', 'not dead'],
|
||||
}),
|
||||
monacoEditorPlugin({
|
||||
publicPath: 'assets/monaco-editor',
|
||||
customDistPath: (root: string, buildOutDir: string, base: string) =>
|
||||
`${root}/${buildOutDir}/assets/monaco-editor`,
|
||||
}),
|
||||
];
|
||||
|
||||
const { SENTRY_AUTH_TOKEN: authToken, RELEASE: release } = process.env;
|
||||
|
||||
Reference in New Issue
Block a user