-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
How to use it on browserify #95
Comments
Agreed, I'd like to be able to bundle this so that everything can be loaded synchronously and so the bundle can be limited to the specific dependencies that I want. |
For example, you can rename |
Maybe you can draw ideas from #40, it's a webpack discussion but it might help. |
rename loader.js require is a good idea |
Fixed by #18? |
In my case, I just replaced <script src="https://cdn.bootcss.com/monaco-editor/0.17.1/min/vs/loader.js"></script> window['require'].config({ paths: { 'vs': 'https://cdn.bootcss.com/monaco-editor/0.17.1/min/vs' } })
window['require'](['vs/editor/editor.main'], function () {
const monaco = window.monaco || require('monaco-editor'); // for IntelliSense
var editor = monaco.editor.create(document.querySelector('.editor-container'), {
language: "javascript",
roundedSelection: false,
scrollBeyondLastLine: false,
readOnly: false,
theme: "vs",
fontSize: 20,
});
}); |
Thanks @yuanliwei your solution worked for me only I changed the cdn url to unpkg: |
When I try to use it on
browserify(gulp-browserify)
, other modules is not imported.I think
require
is overwritten byloader.js
.I ask you to how to use it on
browserify
correctly.The text was updated successfully, but these errors were encountered: