Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 1.56 KB

0.8-0.9.md

File metadata and controls

13 lines (7 loc) · 1.56 KB

Migration Guide 0.8 - 0.9

Take advantage to the new polyfilling

We updated the babel-preset-kyt-core and babel-preset-kyt-react presets with babel-preset-env. Before 0.9, kyt automatically included babel-polyfill into your bundle. With the recent changes, you'll have to manually install babel-polyfill into your package.json dependencies (not devDependencies), and import 'babel-polyfill;' at the top of your src/client/index.js and src/server/index.js file. This will optimize your server build by targeting the current version of Node and by targeting a limited set of browsers using a browserslist configuration on the client build. You can read more about extending the babel-preset-env settings via the envOptions in babel-preset-kyt-core.

Static asset handling updates

In 0.9, we added better support for static assets, including new rules and fingerprinting. You'll find more documentation in the conventions doc.

Linting against the server directory

A new rule in eslint-config-kyt is configured to restrict server file imports from outside of the src/server directory. The change you'll need to make in your project is to add this .eslintrc.js to your src/server directory. The current starter-kyt version includes this configuration.