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

Vite #173

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Vite #173

wants to merge 5 commits into from

Conversation

drzax
Copy link
Member

@drzax drzax commented Sep 20, 2022

This is the overall tracking issue (and eventual pull request) for moving aunty from Webpack to Vite.

aunty's job consists of three things:

  • project bootstrap
  • dev server and final builds
  • versioning and deployment

It will continue to do this things after a migration to vite. #160 has some initial notes and individual issues that require more detailed discussion will be opened and added to the vite milestone so we can have focussed discussions and keep track of decisions on issues.

Plan

  • As part of the vite migration we will add packaging capabilities to aunty
    • aunty will get two new sub-commands package and publish which will package and publish to NPM
    • Packaging will target the /src/lib directory so any components or libraries that live in that directory will be built and transpiled appropriately for release on NPM
    • a separate or modified package.json might be a good idea — not sure how to do this yet
    • aunty publish will build in any conventions we use for packages deployed to NPM
  • aunty build will continue to build the project as before
  • This will mean that for projects that are intended to be purely libraries, the serve command will build a dev playground to use for testing and working on the library modules and the build command will build the static project which could be used for documentation or implementation examples for how to use the library.
  • We need to check how the javascript entry points are generated using vite and how we'll be able to reference localhost dev versions from the CMS.
  • A typescript rewrite, while desirable, is separate from the vite milestone.

@drzax drzax added this to the vite milestone Sep 20, 2022
},
async argv => {
const { port } = await getServeConfig();
const viteConfig = getViteConfig();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This getViteConfig abstraction looks great. It could make it really easy to just optionally add a build.lib config object for a package style command (similarly to how sveltekit lets you publish the lib folder as a library

@drzax drzax mentioned this pull request Sep 21, 2022
@colingourlay
Copy link
Contributor

Now we'll soon have Turbopack to consider 😅

@phocks
Copy link
Member

phocks commented Nov 1, 2022

Heck yeah that looks great.

@drzax
Copy link
Member Author

drzax commented Nov 1, 2022

Why is the internet like this and would I have it any other way?

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.

4 participants