11.0.0: Vite 3, React 18, MDX 2 and Ladle!
Changes
See #48
- Upgrade dependencies
- Vite 2.0 to 3.0
- React 17 to 18.2
- MDX 1.x to 2.1
- Replace Storybook with Ladle
- See #47 for rationale
- Move
components/TropicalCodeBlock
tocomponents/tropical/CodeBlock
- The next release is going to have another "batteries included" Tropical component (a responsive
<Picture>
). I figured I should put these in a special folder instead of mixing them in with your components.
- The next release is going to have another "batteries included" Tropical component (a responsive
Upgrade instructions (more info)
Merge upstream changes
First, configure this repo as a remote for your repo (you only need to do this once)
git remote add template https://github.com/bensmithett/tropical.git
Then fetch & merge the latest changes, resolving any conflicts manually:
git fetch template
git merge template/master
or...
Manually update your code
Merging upstream changes should be straightforward for this change (unless you've made lots of changes to Vite config or TropicalCodeBlock
) but see https://github.com/bensmithett/tropical/pull/48/files for changes you can make manually:
- Update
package.json
dependencies and scripts as per https://github.com/bensmithett/tropical/pull/48/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519 - Add
.ladle/components.jsx
https://github.com/bensmithett/tropical/pull/48/files#diff-67c18fdc9866dc95181e2a2c0dde801941f0c869f5c108e553e43146daab1a40 - Delete the
.storybook
folder - Update
server.js
so it works with Vite 3 https://github.com/bensmithett/tropical/pull/48/files#diff-a4c65ede64197e1a112899a68bf994485b889c4b143198bac4af53425b38406f - Rename
components/TropicalCodeBlock
tocomponents/tropical/CodeBlock
- and update the reference in
entry-server.jsx
- and update the reference in
- Convert any MDX stories to CSF
- Ladle doesn't support MDX stories yet but it's coming soon. If you like your MDX stories, you may want to wait for that update.
- Make sure you have 3 Vite config files as per #48
vite.config.js
- contains shared config used for both the server and client builds (and is picked up by Ladle)vite.config.server.js
vite.config.client.js
As always, open an issue if you're having trouble upgrading and I'll help you through it!