Skip to content

10.0.0: [BROKEN] Move to ES Modules at the project level

Choose a tag to compare

@bensmithett bensmithett released this 01 Feb 06:14
· 52 commits to main since this release
28993dc

Changes

This version is broken, use 10.1.0 instead


We've been stuck for a while because a dependency switched to Pure ESM and Vite's --config didn't let us make the switch #28

This version moves the whole project to ES Modules by setting "type": "module" in package.json.

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

See https://github.com/bensmithett/tropical/pull/38/files, you'll need to:

  • In package.json add "type": "module" and remove the yarn build:server script
  • Rename .storybook/main.js to .storybook/main.cjs
  • yarn outdated and upgrade the outdated dependencies.
  • Copy the changes from
    • prerender.js
    • server.js
    • vite.config.js
  • Delete vite.config.server.js