vdesjs / vite-plugin-monaco-editor

A vite plugin for the Monaco Editor
MIT License
206 stars 36 forks source link

fix: fix empty options and backslash escape missing in webpage #48

Closed erguotou520 closed 10 months ago

erguotou520 commented 10 months ago

In the docs, the following init script will throw error as options is undefined

import { defineConfig } from 'vite';
import monacoEditorPlugin from 'vite-plugin-monaco-editor';

export default defineConfig({
  plugins: [monacoEditorPlugin()],
});

This pr fix this case.

The other problem is \\/\\/ will write as // in the page which will make the regex as error in <script>. This pr fix this case. image