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

How to use vite to build a reusable package and publish it to npm? #1172

Closed
lchrennew opened this issue Nov 30, 2020 · 1 comment
Closed

Comments

@lchrennew
Copy link

Is your feature request related to a problem? Please describe.
When I run vite build and then I get transpiled js and css in default dist folder.
But it seems that these js files cannot be reused by import them into dependents.

Describe the solution you'd like
I can preset the package is an reusable module somewhere, and when I run vite build, I should get the ready-for-publish package in default dist folder.

Describe alternatives you've considered
I published the source code, that means only projects using vite can best reuse the published package

Additional context
I think it is important to keep vite to be simple to use in a world fullfilled with competition.

@underfin
Copy link
Member

Vite has better support with web application, but it has some limit with library. Let us track here #330

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants