Upgrading
Upgrading existing Emulsify Core themes from 2.x to 3.x
Emulsify 3.x implemented various refactoring of webpack and storybook's configuration. While most changes were consistent with the 2.x version there are some changes that will need to be manually made to your theme as webpack and storybook now expect certain files to be present. The steps below outline what you'll need to do to upgrade Emulsify Core and convert your existing theme. You can also view all the changes made to the whisk/ directory in the following pull-request for a more detailed view of the changes needed.
- Edit the package.json and change your
@emulsify/coredependency to"@emulsify/core": "^3.0.3", - Edit the
.nvmfile and change the version to24 - Rename and convert the
/config/emulsify-core/eslintrc.config.jsonconfig file to/config/emulsify-core/eslintrc.config.js. Eslint 9.x was a large shift with how the package implements and consumes configuration. You will need to use a module export ofdefineConfigthat includes any customization you had from your json file. If there are no customizations from your existing project just copy the following file. See the file diff for details. - Rename
/config/emulsify-core/storybook/example.theme.jsto/config/emulsify-core/storybook/theme.js. If you'd like to use the default storybook emulsify theme then export an empty constconst storybookTheme = {};and comment/remove the sample theme overrides. - Convert
/config/emulsify-core/storybook/main.jsto a type module script. See file diff. - Convert
/config/emulsify-core/storybook/preview.jsto a type module script. See file diff. - Include empty
/config/emulsify-core/storybook/manager-head.htmland/config/emulsify-core/storybook/preview-head.htmlfiles. These files can be modified to include<script>or<link>tags for globally loaded JS/CSS files. - Rename
/config/emulsify-core/webpack/example.babel.config.jsto/config/emulsify-core/webpack/example.babel.config.cjs