Releases: gatsbyjs/gatsby
1.0.0-alpha5
v1.0.0-alpha4
Added
- Add more file extensions to file/url loader config. Default to url-loader unless it never makes sense to use data-uri e.g. favicons.
- Use api-runner-browser for calling browser extension APIs/replacements. Prep for plugin system.
- Add extension API
clientEntry
that let's site code and plugins to run code at the very start of client app.
Changed
- Add config to uglify to ignore ie8.
- Disable building AppCache until can research if useful.
- Turn on screw_ie8 options in UglifyJS.
Fixed
- Actually use the "sources" key from gatsby-config.js for looking for markdown files. This will be getting an overhaul soon.
- Don't use null-loader for css during the build-js stage as this prevents offline-plugin from caching files referenced in your CSS.
- Add missing publicPath for build-html step.
Bug fixes, new site launches, new sponsors
While we're hard at work pushing on all the great new 1.0 features, 0.x is still getting a lot of fine-tuning and bug fixing.
@f0rr0 has fixed a number of bugs recently:
- following symlinks correctly #477 and #480
- Fix link prefixing when importing files #474
- Fix hash tag scrolling #467
@KyleAMathews dug into some bugs with NPM2 and fixed them in #435 and #436
Recent site launches
New sponsors!
We're super grateful for our sponsors who are making 1.0 possible.
DX improvements 🎉🎉🎉
- @tsunammis added support for importing files with query parameters #398
- @benstepp changed path creation so that starting and trailing slashes are automatically added as this is a common problem and is easy to programmatically fix instead of just telling users to fix it themselves.
Sites launched on Gatsby since the last release
Prompt user to use new port if in requested port is in use
Quick release to add this very nice UX improvement contributed by @LukeSheard and borrowed from Create React App's similar feature: facebook/create-react-app#101
Fix for NPM 2 peerDependencies + error swallowing issues
Image supported added!
Gatsby now ships with richer support for images. Now you can "import" or "require" an image and use it within your React components and under the hood, the images will be automatically optimized.
import myImage from './my-image.jpg'
// in render function
<div>
<h1>Hi friends!</h1>
<img src={myImage} />
</div>
We're using the image-webpack-loader which uses the popular Imagemin project to minify your images.
There's future (responsive) image work planned! See #285 if you want to get involved.
Upgrade
This is marked as a breaking release as it could interfere with your Webpack config if you already have added image loader support.
If you have added custom image loaders already, to upgrade, in your modifyWebpackConfig
function in gatsby-node.js
add this line: config.removeLoader('images')
You'll also need to add image-webpack-loader
to your site:
npm install --save-dev image-webpack-loader
Enjoy!
CSS Modules!
Major improvements
- @jakubrohleder added support for CSS Modules, a very long-standing request. Thanks Jakub! CSS Module support is enabled for all files with
.module.(css|less|scss|sass)
extension. #295
Minor (but awesome) improvements
- Some css module types (Less/Sass) weren't being minimized 0a667e0
- @adjohnson916 noticed we were using a private API of React Router #343
- Added check for processes listening to the port requested by
gatsby serve-build
similar to what we do forgatsby listen
#345 - Set the
NODE_ENV
toproduction
for node code (we were already doing this for Webpack modules but some Webpack loaders don't behave correctly without this fix #348
Breaking changes
None!
Don't start develop server if port in use & show friendlier error message
@crucialfelix raised two issues in #334 — a) it's hard to figure out to do when Node throws up it's cryptic EADDRINUSE error and b) Gatsby doesn't die as it should when it hits that but pretends it's running.
In #335 I fixed both where gatsby develop
now dies when the server can't start (for whatever reason) and when Node throws a EADDRINUSE error, we catch that, find the process that is listening on that port and show this error message:
We were unable to start Gatsby on port 8000 as there's already a process
listening on that port (PID: 43337). You can either use a different port
(e.g. gatsby develop --port 8001) or stop the process already listening
on your desired port.
Quick bug fix release
It turns out we need two stage types for development as adding HMR to the development server rendering the html.js
caused very obscure stack traces when there's errors in your html.js. Fixed in #305 by @benstepp.
Also @KyleAMathews added another small invariant to check what a user returns when they modify the Webpack config 58ea254.