Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

.vscode-test-web folder is published to npm #356

Closed
F3n67u opened this issue Mar 23, 2022 · 1 comment · Fixed by #357
Closed

.vscode-test-web folder is published to npm #356

F3n67u opened this issue Mar 23, 2022 · 1 comment · Fixed by #357
Assignees
Labels
bug Something isn't working

Comments

@F3n67u
Copy link
Contributor

F3n67u commented Mar 23, 2022

Describe the bug

a 23M .vscode-test-web dir is published to npm, make vscode-webview-ui-toolkit's unpack size huge(24.3M current)

https://unpkg.com/browse/@vscode/[email protected]/

image

To reproduce

$ mkdir toolkit-test 
$ cd toolkit-test
$ yarn add @vscode/webview-ui-toolkit 
$ cd node_modules/@vscode/webview-ui-toolkit
$ du -sh .vscode-test-web 
 23M    .vscode-test-web

Expected behavior

.vscode-test-web is ignored when published to npm

Current behavior

.vscode-test-web dir is published to npm

BTW

should we also ignore react dir?

@hawkticehurst
Copy link
Member

Wowow 😅🤦🏻‍♂️ thank you so much for catching this (and for the subsequent PR)!

I'll go ahead and merge that right now and publish a new patched version of the package.

Also, no the react folder in the root directory should stay. It's the (annoyingly janky) way that we have to structure the NPM build at this time so that toolkit users can import the toolkit React components via the @vscode/webview-ui-toolkit/react path.

It will eventually be removed/restructured once TypeScript releases support for the package.json exports field. You can read more about it here if you're curious.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants