vue-monaco icon indicating copy to clipboard operation
vue-monaco copied to clipboard

languageDefinitiones is undefined

Open astrolemonade opened this issue 3 years ago • 3 comments

image\

this is my vue.config.js

const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin')

module.exports = {
  configureWebpack: {
   plugins: [
      new MonacoWebpackPlugin({
        // available options are documented at https://github.com/Microsoft/monaco-editor-webpack-plugin#options
        languages: ['javascript', 'css', 'html', 'typescript', 'json', 'text']
      })
    ]
  }
}

astrolemonade avatar May 26 '21 00:05 astrolemonade

Related https://github.com/microsoft/monaco-editor-webpack-plugin/issues/152

Workaround is to pin the following:

    "monaco-editor": "0.20.0",
    "monaco-editor-webpack-plugin": "1.9.1",

Or alternatively don't use webpack, and load via AMD instead.

jleskovar avatar Aug 01 '21 08:08 jleskovar

Can confirm issue is fixed in latest version of monaco-editor (>=0.27.0)

If using yarn, you can pin via:

  "resolutions": {
    "vue-monaco/monaco-editor": "^0.27.0"
  }

jleskovar avatar Sep 27 '21 21:09 jleskovar

Related https://github.com/microsoft/monaco-editor-webpack-plugin/issues/152

Workaround is to pin the following:

    "monaco-editor": "0.20.0",
    "monaco-editor-webpack-plugin": "1.9.1",

Or alternatively don't use webpack, and load via AMD instead.

Do you have an example of how to do it?

elglogins avatar Aug 16 '23 07:08 elglogins