You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project where I am using monaco-react editor , where the user only write in JSON and javascript format, but when I build the project I get all the files in the dist -> assets folder such dart, java , etc... but I only want the necessary javascript and JSON files
by the way im using react with vite
here is my code
import { loader,Editor } from '@monaco-editor/react';
import * as monaco from 'monaco-editor';
import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker';
self.MonacoEnvironment = {
getWorker(_, label) {
if (label === 'typescript' || label === 'javascript') {
return new tsWorker();
}
return new editorWorker();
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a project where I am using monaco-react editor , where the user only write in JSON and javascript format, but when I build the project I get all the files in the dist -> assets folder such dart, java , etc... but I only want the necessary javascript and JSON files
by the way im using react with vite
here is my code
import { loader,Editor } from '@monaco-editor/react';
import * as monaco from 'monaco-editor';
import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker';
self.MonacoEnvironment = {
getWorker(_, label) {
},
};
loader.config({ monaco });
return (
);
Beta Was this translation helpful? Give feedback.
All reactions