Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unexpected usage (integration with vue) #1385

Closed
soneway opened this issue Mar 21, 2019 · 7 comments
Closed

Error: Unexpected usage (integration with vue) #1385

soneway opened this issue Mar 21, 2019 · 7 comments
Labels
info-needed Issue requires more information from poster integration

Comments

@soneway
Copy link

soneway commented Mar 21, 2019

languageFeatures.js?810d:85 Error: Unexpected usage
at EditorSimpleWorkerImpl.BaseEditorSimpleWorker.loadForeignModule (editorSimpleWorker.js?8c76:468)
at eval (webWorker.js?a9b4:39)

@Symbolk
Copy link

Symbolk commented Jun 27, 2019

Looking for a solution...

@Symbolk
Copy link

Symbolk commented Jul 2, 2019

My solution: Configure webpack-plugin in vue.config.js, instead of webpack.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']
      })
    ]
  }

@cdll
Copy link

cdll commented Nov 18, 2019

same issue here when treating with json

@alexdima alexdima changed the title Error: Unexpected usage Error: Unexpected usage (integration with vue) Dec 11, 2019
@alexdima
Copy link
Member

@soneway Have you resolved your issue?

@alexdima alexdima added the info-needed Issue requires more information from poster label Dec 11, 2019
@alexdima
Copy link
Member

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@tjk
Copy link

tjk commented Jan 10, 2020

Can this be reopened please?

@Symbolk do you understand why making that changed fixed anything?

@wowtrxqn
Copy link

My solution: Configure webpack-plugin in vue.config.js, instead of webpack.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']
      })
    ]
  }

when i use this solution ,see microsoft/monaco-editor-webpack-plugin#96

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster integration
Projects
None yet
Development

No branches or pull requests

6 participants