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

Deploy to NPM with sourcemaps OR don't compile with sourcemap refs. #1305

Closed
philcockfield opened this issue Feb 6, 2019 · 0 comments
Closed
Assignees
Milestone

Comments

@philcockfield
Copy link

philcockfield commented Feb 6, 2019

monaco-editor version: 1.10.1
Browser: Chrome
OS: OSX


Steps or JS usage snippet reproducing the issue:

Bundling tools (such as webpack or parcel) attempt to load source-maps when referenced within JS files - and throw warnings when not found.

The monaco-editor source that is published to NPM contains references to source-maps that are not included within the package.

For example, here is a sample warning (of hundreds) emitted by Parcel when trying to bundle monaco:

⚠️  Could not load existing sourcemap of "../../node_modules/monaco- 
editor/esm/vs/language/json/_deps/vscode-json-languageservice/utils/json.js".

This is pointing to the following file, which contains this reference as the last line:

//# sourceMappingURL=json.js.map

image

The json.js.map file that it is expecting as a sibling has not be included on the published NPM package.


SOLUTION:

  1. Either include the sourcemap files in the published package, or
  2. Don't transpile with the sourcemap references.

Thanks! 🍰

@alexdima alexdima modified the milestones: On Deck, February 2019 Feb 28, 2019
@alexdima alexdima modified the milestones: February 2019, August 2019 Sep 19, 2019
@alexdima alexdima assigned alexdima and unassigned aeschli Sep 19, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants