v0.8.2
0.8.2 (December 7, 2016)
🚀 New Feature
react-scripts
-
#1176 Add Subresource Integrity support. (@XVincentX)
The generated HTML now includes Subresource Integrity attributes ensuring that your users aren't served malicious code if your CDN gets compromised.
-
🐛 Bug Fix
react-scripts
-
#1197 Let Jest handle all file types. (@gaearon)
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.
-
#1194 Only honor relative
NODE_PATH
. (@gaearon)Historically we have allowed specifying
NODE_PATH
environment variable as a way to allow “absolute imports”. For example, runningNODE_PATH=src npm start
in Bash orset NODE_PATH=src&&npm start
in Windows Cmd would let you import anything insidesrc
without specifying a relative path. However, we found a few nasty edge cases when Node.js core modules end up being inNODE_PATH
and 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 fromNODE_PATH
in Create React App. This means the existing use case for absolute imports is still supported (src
in the example above is relative), but absolute paths inNODE_PATH
(such as paths to Node.js core modules) will be ignored. -
#1188 Update Webpack to fix source map issues. (@gaearon)
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.
-
#1180 Use
file-loader
for svgs. (@bogdansoare)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.
-
react-dev-utils
babel-preset-react-app
💅 Enhancement
eslint-config-react-app
-
#1191 Relax peerDependencies for ESLint preset. (@gaearon)
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.
-
#1159 Make jsx-no-undef rule an error. (@existentialism)
Using an undefined type in JSX is now treated as a hard lint error because it is guaranteed to crash application at runtime.
-
react-scripts
-
#1175 Remove path module from webpack config on eject. (@harunhasdal)
This makes the output after ejecting a bit cleaner.
-
#1120 Add
testURL
to Jest config. (@spudly)This fixes an error when running tests that interact with History API in jsdom.
-
📝 Documentation
react-scripts
- #1143 Add deploy to Firebase CDN on template's README (Closes #374). (@guilhermebruzzi)
- #1099 Fix minor typo/grammar. (@alex-wilmer)
- #1168 Add "npm run build silently fails" to Troubleshooting. (@gaearon)
Committers: 12
- 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 [email protected]