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

Why doesn't VSCode use require.js directly? #11

Open
vikyd opened this issue May 14, 2018 · 3 comments
Open

Why doesn't VSCode use require.js directly? #11

vikyd opened this issue May 14, 2018 · 3 comments

Comments

@vikyd
Copy link

vikyd commented May 14, 2018

Why doesn't VSCode use require.js directly?

@jinwenhua
Copy link

I wonder if you can slove the problem when I use require.js directly?
ReferenceError: define is not defined
at NLSLoaderPlugin (d:\gitbook\IDEbook\search\output\vs\nls.js:152:5)
at Object. (d:\gitbook\IDEbook\search\output\vs\nls.js:153:3)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (d:\gitbook\IDEbook\search\output\vs\platform\workspaces\common\workspaces.js:9:15)
Waiting for the debugger to disconnect...

@aztack
Copy link

aztack commented Sep 27, 2021

I wonder if you can slove the problem when I use require.js directly?
ReferenceError: define is not defined
at NLSLoaderPlugin (d:\gitbook\IDEbook\search\output\vs\nls.js:152:5)
at Object. (d:\gitbook\IDEbook\search\output\vs\nls.js:153:3)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object. (d:\gitbook\IDEbook\search\output\vs\platform\workspaces\common\workspaces.js:9:15)
Waiting for the debugger to disconnect...

<script type="text/javascript" src="loader.js"></script>
<script>
    globalThis.define = loader;
</script>

@aztack
Copy link

aztack commented Sep 28, 2021

Why doesn't VSCode use require.js directly?

The vscode-loader supports multiple environment(node, web, electron and web worker) and can switch different implementation automatically. Maybe this is the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants