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

specify css exports in package.json #20

Merged
merged 2 commits into from
Jun 25, 2023
Merged

specify css exports in package.json #20

merged 2 commits into from
Jun 25, 2023

Conversation

TheSharpieOne
Copy link
Contributor

Currently only the JS is specified in the exports within package.json. When exports field is present, it means anything not explicitly listed inside is not exposed. This means the css is not exposed. This results in this error message when using vite:

[commonjs--resolver] Missing "./dist/handy-scroll.css" specifier in "handy-scroll" package
error during build:
Error: Missing "./dist/handy-scroll.css" specifier in "handy-scroll" package

Per vitejs/vite#2657 (reply in thread), a separate export can be added to expose the css.

How I tested: I updated the exports package.json within my node_modules/handy-scroll where I was having this issue and this change resolved the issue.

package.json Outdated Show resolved Hide resolved
@Amphiluke Amphiluke merged commit a4b4659 into Amphiluke:master Jun 25, 2023
@TheSharpieOne TheSharpieOne deleted the patch-1 branch July 6, 2023 16:43
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

Successfully merging this pull request may close these issues.

2 participants