Be notified of new releases
Create your free GitHub account today to subscribe to this repository for new releases and build software alongside 28 million developers.Sign up
0.8.2 (December 7, 2016)
🚀 New Feature
🐛 Bug Fix
Since 0.8.0, we started treating imports of any unknown file extensions as URLs. However, we had to revert this change for the test configuration in 0.8.1 because of a bug causing false positives. In 0.8.2, we are fixing this and making test configuration treat imports with unknown extensions the same way as we do in the browser environment.
Historically we have allowed specifying
NODE_PATHenvironment variable as a way to allow “absolute imports”. For example, running
NODE_PATH=src npm startin Bash or
set NODE_PATH=src&&npm startin Windows Cmd would let you import anything inside
srcwithout specifying a relative path. However, we found a few nasty edge cases when Node.js core modules end up being in
NODE_PATHand erroneously become bundled. As a result the build would crash on some systems when some libraries are imported. To fix this, we now only honor relative paths from
NODE_PATHin Create React App. This means the existing use case for absolute imports is still supported (
srcin the example above is relative), but absolute paths in
NODE_PATH(such as paths to Node.js core modules) will be ignored.
Since 0.8.0, we show source maps in development instead of the compiled code. However, it has come to our attention that Webpack's source map implementation had issues interpreting Babel output, and caused source maps to be wrong and breakpoints to be unusable in some cases. Webpack has released a fix for this, and we have updated the minimal version of Webpack that we are using.
Since 0.8.0, we are treating all imports with non-JS/CSS extensions the same way. Importing them gives you a string with their URL, and if their content is small enough (less than 10K), the URL is in fact an inlined data URI. However, this doesn't work well with SVGs in case you use them for a sprite system since fragments don't work in data URIs, and it's wasteful to inline the same sprite SVG many times. To fix this, we have added an exception so that SVG files never get inlined.
This allows the preset to be used in more apps without peer dependency conflicts. We still pin the exact versions in apps that haven't ejected for extra safety.
Using an undefined type in JSX is now treated as a hard lint error because it is guaranteed to crash application at runtime.
- Alex Wilmer (alex-wilmer)
- Bogdan Soare (bogdansoare)
- Brian Ng (existentialism)
- Dan Abramov (gaearon)
- Fabrizio Castellarin (EnoahNetzach)
- Guilherme Heynemann Bruzzi (guilhermebruzzi)
- Harun (harunhasdal)
- James Newell (jameslnewell)
- Jirat Ki. (n3tr)
- Li Xuanji (zodiac)
- Stephen John Sorensen (spudly)
- Vincenzo Chianese (XVincentX)
Migrating from 0.8.1 to 0.8.2
Inside any created project that has not been ejected, run:
npm install --save-dev --save-exact firstname.lastname@example.org