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

.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/webview-ui-toolkit@0.9.2/

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants