Skip to content

Conversation

@jakebailey
Copy link
Member

After #236640, these paths are only used in a handful of import types. They can be removed, along with baseUrl.

Copy link
Member

@bpasero bpasero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool 👏

@vs-code-engineering vs-code-engineering bot added this to the January 2025 milestone Jan 22, 2025
@jakebailey
Copy link
Member Author

In the future you may also want to consider using package.json import maps, which would then let you restore imports that look like:

import * as foo from "#vs/base/parts/sandbox/common/sandboxTypes"

@bpasero
Copy link
Member

bpasero commented Jan 22, 2025

In the future you may also want to consider using package.json import maps, which would then let you restore imports that look like:

import * as foo from "#vs/base/parts/sandbox/common/sandboxTypes"

I think there was a discussion about this. Wouldn't we want to stay as close as possible to JS standards where imports are relative?

@jakebailey
Copy link
Member Author

I guess it depends on what you mean by "standard", but import maps are part of Node (https://nodejs.org/api/packages.html#imports) and supported by all bundlers, alternative runtimes. Technically speaking they can be provided in the browser (https://web.dev/blog/import-maps-in-all-modern-browsers) but it's not super great, but I had assumed that you wouldn't actually need to run your raw ESM output in a browser context (in favor of bundling).

@jakebailey
Copy link
Member Author

(You of course don't have to use import maps, I just know relative imports can sometimes be annoying and what you had before is very similar to import maps!)

@mjbvz mjbvz merged commit 678bac6 into microsoft:main Jan 22, 2025
7 checks passed
@jakebailey jakebailey deleted the remove-tsconfig-paths branch January 22, 2025 17:12
@bpasero
Copy link
Member

bpasero commented Jan 22, 2025

We do support running VS Code out of sources (no bundling) in web too.

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Mar 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants