简体   繁体   中英

Monaco editor for vue generates lots of .js files

I am implementing vue-monaco plugin inside Laravel application using Vue.

The steps are rather easy, I install the vue-monaco like:

npm install vue-monaco

Then in my Vue file I import the monaco editor like:

import MonacoEditor from 'vue-monaco'

I don't even use it, just import it and then run npm run watch . This result in npm creating exactly 63 files in my public folder, like in the image below (first 15 are shown, 63 are being created).

Why does this happen and how can I bypass it?

在此处输入图像描述

vue-monaco is basically a VScode in your webview, right? If it's the case, it's probably creating some configuration files for it to work and this is totally normal.

What's the content of those files and the content of your package.json ( npm run watch )?

If you want to custom some options for this plugin, it looks like that you will need to dive into those settings: https://microsoft.github.io/monaco-editor/api/modules/monaco.editor.html#create and pass it as props to vue-monaco (this info is taken from the doc itself).

Otherwise, creating a simple vue project can help debug things too IMO, see if the files are created in public too or if it's more of a laravel configuration issue. Then, you could maybe try the github issue of the main JS project: https://github.com/microsoft/monaco-editor/issues?q=is%3Aissue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM