-
Notifications
You must be signed in to change notification settings - Fork 8
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
Replace Webpack with Vite #27
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
browserslist has sensible default values now
* lots of the Webpack stuff in build.js will be handled by Vite * hydrationHelpers have been slightly rewritten and released as a standalone lib, tropical-islands
Vite will handle those responsibilities for us!
It'll be easier to init from scratch
Don't need this config any more
`yarn create @vitejs/app` will give us a new set of dependencies from scratch
The Vite React app scaffold
I don't care for the dependencies/devDependencies split. You need all dependencies to be able to do anything in Tropical.
This boilerplate is for a client-side React app. Tropical is all about the SSR!
We'll keep using both CodeBlock and cssReset with some minor changes
* Ran `npx sb@next init --builder storybook-builder-vite` as per https://storybook.js.org/blog/storybook-for-vite/ * Changed component & story file extensions from `js` to `jsx` (Vite uses this to transpile JSX) * `yarn install`
* Followed Vite's guides and examples for setting up a dev server and prerender (static site build) https://vitejs.dev/guide/ssr.html and https://github.com/vitejs/vite/blob/main/packages/playground/ssr-react/prerender.js * Added MDX support via vite-plugin-mdx * Add some helpers for working with tags * Add example pages * Add a JSON Feed * Make all of that render both from the dev server and the static build * Get island hydration working with the new tropical-islands package (replaces this repo's old hydrationHelpers) * Add scripts for scaffolding new pages & components (via tropical-scaffold package)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a big rewrite using Vite. It's way better.