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

add vite build command #1183

Merged
merged 5 commits into from
Feb 21, 2025
Merged

Conversation

DanDroryAu
Copy link
Contributor

Add build command to the set of vite experimental commands.

build will use the routes object in the sku.config.ts to build out the static sites for those routes.

This can be tested by running build in the vite-test-app fixture and running serve afterwards to test it. serve is still using the original serve method from sku.

This does not yet support full lazy loading which will come in a future pr.

@DanDroryAu DanDroryAu requested a review from a team as a code owner February 18, 2025 05:28
Copy link

changeset-bot bot commented Feb 18, 2025

⚠️ No Changeset found

Latest commit: 88a49b8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@DanDroryAu DanDroryAu changed the base branch from master to experimental-vite-support February 18, 2025 05:29
Copy link
Contributor

@askoufis askoufis left a comment

Choose a reason for hiding this comment

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

I can't load the nz site after running sku build && sku serve. Looks like the site path is nested an extra level for some reason.

image

Haven't had a chance to take a good look at the preloading implementation just yet. Or is it worth wait until full lazy loading is supported in a future PR?

@DanDroryAu
Copy link
Contributor Author

DanDroryAu commented Feb 18, 2025

I can't load the nz site after running sku build && sku serve. Looks like the site path is nested an extra level for some reason.
Haven't had a chance to take a good look at the preloading implementation just yet. Or is it worth wait until full lazy loading is supported in a future PR?

This is the same behavior as the multiple-routes fixture. It does the same thing so maybe we need to have a look at both of those.

Also, currently the collector only gets all of the files from the manifest and doesn't do anything with lazy loading yet. The CollectorContext and plugin are still missing. I'm only using it to inject the correct scripts in the index.html from manifest.

I'll add lazy loading and the corresponding plugin in as a separate pr.

@askoufis
Copy link
Contributor

I can't load the nz site after running sku build && sku serve. Looks like the site path is nested an extra level for some reason.
Haven't had a chance to take a good look at the preloading implementation just yet. Or is it worth wait until full lazy loading is supported in a future PR?

This is the same behavior as the multiple-routes fixture. It does the same thing so maybe we need to have a look at both of those.

Also, currently the collector only gets all of the files from the manifest and doesn't do anything with lazy loading yet. The CollectorContext and plugin are still missing. I'm only using it to inject the correct scripts in the index.html from manifest.

I'll add lazy loading and the corresponding plugin in as a separate pr.

NVM, that's just how that fixture (and the vite one) are configured. On the NZ domain / doesn't work, you have to go to /nz. 🤦

@DanDroryAu DanDroryAu merged commit fccd461 into experimental-vite-support Feb 21, 2025
4 checks passed
@DanDroryAu DanDroryAu deleted the vite-build-command branch February 21, 2025 03:26
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