mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
Update extensions/CONTRIBUTING.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -24,9 +24,9 @@ By default extensions will only target desktop. To enable an extension in browse
|
||||
|
||||
- Add a `"browser"` entry in `package.json` pointing to the browser bundle (for example `"./dist/browser/extension"`).
|
||||
- Add `tsconfig.browser.json` that typechecks only browser-safe sources.
|
||||
- Add a `esbuild.browser.mts` file. This should set `platform: 'browser'`.
|
||||
- Add an `esbuild.browser.mts` file. This should set `platform: 'browser'`.
|
||||
|
||||
Make sure the browser build of the extension only uses browser safe APIs. If an extension needs different behavior between desktop and web, you can create distinct entrypoints for each target:
|
||||
Make sure the browser build of the extension only uses browser-safe APIs. If an extension needs different behavior between desktop and web, you can create distinct entrypoints for each target:
|
||||
|
||||
- `src/extension.ts`: Desktop entrypoint.
|
||||
- `src/extension.browser.ts`: Browser entrypoint. Make sure `esbuild.browser.mts` builds this and that `tsconfig.browser.json` targets it.
|
||||
|
||||
Reference in New Issue
Block a user