A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/CodinGame/monaco-vscode-api/wiki/Troubleshooting below:

Troubleshooting · CodinGame/monaco-vscode-api Wiki · GitHub

Many packages are published with the same version, and almost all of them depend on the @codingame/monaco-vscode-api main package (with strict version range).

It is VERY important that only a single version of ALL the packages is installed, otherwise weird things can happen.

You can check that npm list vscode only lists a single version.

monaco-editor-webpack-plugin

Starting from v2, monaco-editor-webpack-plugin can't be used

Here's the alternative for each options:

exclude assets from loaders

Webpack makes all file go through all matching loaders. This libraries need to load a lot of internals resources, including HTML, svg and javascript files (for default extension codes).

We need webpack to let those file untouched:

Fortunately, all the assets are loaded via the new URL('asset.extension', import.meta.url) syntax, and webpack provide a way to exclude the file loaded that way: dependency: { not: ['url'] } see https://webpack.js.org/guides/asset-modules/

This library uses a lot the new URL('asset.extension', import.meta.url) syntax which is supported by vite

While it works great in build mode (because rollup is used), there is some issues in watch mode:

There are workarounds for both:

import importMetaUrlPlugin from '@codingame/esbuild-import-meta-url-plugin'

{
  ...
  optimizeDeps: {
    esbuildOptions: {
      plugins: [importMetaUrlPlugin]
    }
  }
}

Some dependencies are published only as CommonJS, and vite fails by default to work with them when used in a worker.

Those libraries are concerned:

If you use the corresponding service override, you can force vite to optimize them, which will make vite properly handle commonjs, by adding them in the vite config in optimizeDeps.include:

export default defineConfig({
  optimizeDeps: {
    include: [
      'vscode-textmate',
      'vscode-oniguruma',
      '@vscode/vscode-languagedetection'
    ]
  }
})
If using Angular and getting Not allowed to load local resource: errors

The short version: set up and use a custom webpack config file and add this under module:

parser: {
  javascript: {
    url: true,
  }
}

See this issue or this StackOverflow answer for more details, and this discussion for more context.

The typescript language features extension is not providing project-wide intellisense

The typescript language features extensions requires SharedArrayBuffer to enable project wide intellisense or only a per-file intellisense is provided.

It requires crossOriginIsolated to be true, which requires assets files to be servers with some specific headers:

At least thoses files should have the headers:

If adding those headers is not an options, you can have a look at https://github.com/gzuidhof/coi-serviceworker, but only if you are not using webviews as it introduces problems then.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4