No dependencies detected when importing monaco-editor with webpack

vuejs code:

import monaco from "monaco-editor/min/vs/loader.js"; 

webpack.base.conf.js:

 entry: { app: './src/main.js' }, output:{ path:resolve(__dirname, '../dist'), filename:'[name].js', publicPath: '/' } 

im using monaco-editor with webpack, but I can't even import loader.js. it seems that js files in monaco-editor / vs cannot load.

terminal output:

 These dependencies were not found: * vs/editor/edcore.main in ./~/monaco-editor/min/vs/editor/editor.main.js * vs/language/typescript/src/mode in ./~/monaco-editor/min/vs/editor/editor.main.js * fs in ./~/monaco-editor/min/vs/language/typescript/lib/typescriptServices.js 

What can I do?

+5
source share

Source: https://habr.com/ru/post/1269314/


All Articles