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

Build website and library in library mode #12472

Closed
4 tasks done
dominictobias opened this issue Mar 17, 2023 · 2 comments
Closed
4 tasks done

Build website and library in library mode #12472

dominictobias opened this issue Mar 17, 2023 · 2 comments

Comments

@dominictobias
Copy link

Description

The website is for documenting the component, so we should be able to build and publish both.

Suggested solution

When using library mode: https://vitejs.dev/guide/build.html#library-mode

Continue to build the website as before as this is typically for documentation and/or demos of the component.

Alternative

No response

Additional context

No response

Validations

@fi3ework
Copy link
Member

fi3ework commented Mar 18, 2023

It's a bit like #7009, do you think so?
Maybe what you're expecting is something like this:

vite build # build the lib
vite build-lib-preview # build the site used in development and use the prev step artifact instead of bundleless source code
vite preview

When implementing, multiple scenarios should be considered. Such as which artifact should be used if there are multiple formats 🤔

@dominictobias
Copy link
Author

dominictobias commented Mar 18, 2023

Yes I think so - basically a way to build both, but if vite does some cleaning of the dist folder then I think build-lib-preview would remove the library artefacts from vite build?

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

No branches or pull requests

2 participants