The best React-based framework with performance, scalability and security built in.
MIT License
Bot releases are hidden (Show)
Published by KyleAMathews about 8 years ago
clientEntry
that let's site code and plugins to run code at the very start of client app.Published by KyleAMathews about 8 years ago
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:
@kyleamathews dug into some bugs with NPM2 and fixed them in https://github.com/gatsbyjs/gatsby/pull/435 and https://github.com/gatsbyjs/gatsby/pull/436
We're super grateful for our sponsors who are making 1.0 possible.
Published by KyleAMathews about 8 years ago
Published by KyleAMathews about 8 years ago
Quick release to add this very nice UX improvement contributed by @LukeSheard and borrowed from Create React App's similar feature: https://github.com/facebookincubator/create-react-app/pull/101
Published by KyleAMathews about 8 years ago
Published by KyleAMathews over 8 years ago
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 https://github.com/gatsbyjs/gatsby/issues/285 if you want to get involved.
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!
Published by KyleAMathews over 8 years ago
.module.(css|less|scss|sass)
extension. https://github.com/gatsbyjs/gatsby/pull/295
gatsby serve-build
similar to what we do for gatsby listen
#345NODE_ENV
to production
for node code (we were already doing this for Webpack modules but some Webpack loaders don't behave correctly without this fix #348None!
Published by KyleAMathews over 8 years ago
@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.
Published by KyleAMathews over 8 years ago
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 https://github.com/gatsbyjs/gatsby/commit/58ea25468fe72a5e19a2e1aef97d183895a41b85.
Published by KyleAMathews over 8 years ago
Quick release to fix the module resolve config to default to loading modules from Gatsby's node_modules
directory. This bug was introduced in 0.11.1 but shouldn't have affected most of you. See https://github.com/gatsbyjs/gatsby/pull/299 for the full details.
Published by KyleAMathews over 8 years ago
@benstepp made a number of tweaks to our default Webpack setup which dropped build times by ~30%! https://github.com/gatsbyjs/gatsby/pull/294
@kyleamathews fixed a bug where running gatsby --help
outside of a Gatsby site would erroneously show a warning https://github.com/gatsbyjs/gatsby/commit/1fa7c4d8ef79966223320c4f981fed9c38cc85fd
Published by KyleAMathews over 8 years ago
The headliner of this release is you can now inline CSS in the <head>
of your site. This is a best practice recommended by Google's AMP project among others as you then avoid additional requests which can signifcantly slow down your site. Testing using webpagetest.org showed that moving css inline improved the Speed Index 20-50%!! In one test on a simulated 3G connection, the time to initial render went from ~1.8 seconds to ~1 second.
It's a very simple switch to make. See this commit in the default starter https://github.com/gatsbyjs/gatsby-starter-default/commit/1faecb5a7ded5585b12e8330f9aaa663f9d8b769 It's also documented at https://github.com/gatsbyjs/gatsby#inline-css
post-build.js
moved inside gatsby-node.js
. If you had added a post-build.js
module to your code, this function should now be exported from gatsby-node.js
. A simple way to make the change is to simply require post-build.js
there e.g. exports.postBuild = require('./post-build')
. Thanks to @LukeSheard for this! #273static
is split into two stages, build-css
and build-html
and production
is now build-javascript
. We think these are much more sensible names. Thanks to @scottnonnenberg for the this! #253@benstepp did a deep refactor of how we're loading Babel plugins. There shouldn't be any breaking changes but it fixes a number of bugs https://github.com/gatsbyjs/gatsby/pull/279
Some highlights:
.babelrc
passed to webpack.react-hmre
rather than being overwritten in develop.js.Published by KyleAMathews over 8 years ago
Thanks to the efforts of @patrykkopycinski, Gatsby now supports React 15. This should be an easy upgrade for most people as long as your current site is showing deprecation warnings in the console.log. https://github.com/gatsbyjs/gatsby/pull/252
@alampros also contributed a bug fix as he noticed that when setting the host option for gatsby develop
and gatsby serve-build
that the short version -h
overrode the default help option. He changed that to -H
so there would no longer be a conflict https://github.com/gatsbyjs/gatsby/pull/247.
Published by KyleAMathews over 8 years ago
@alampros added a --open
flag to gatsby develop
and gatsby serve-build
so Gatsby can now automatically open your site in your default browser. https://github.com/gatsbyjs/gatsby/commit/09ea56a01a0530c2941871358fff70a3a562cdce
@benstepp continued his testing ways and added integration tests for building pages with Markdown and HTML and added tests for the rewritePath
API. Great stuff! https://github.com/gatsbyjs/gatsby/pull/240
@kyleamathews fixed a bug where running gatsby --version
wasn't actually returning the version 😬 https://github.com/gatsbyjs/gatsby/pull/249
Published by KyleAMathews over 8 years ago
@benstepp waded into the center of Gatsby and refactored one of the core functions AND setup a test framework AND added a number of tests. Awesome! https://github.com/gatsbyjs/gatsby/pull/232
gatsby-node.js
were being swallowed. @kyleamathews fixed that in https://github.com/gatsbyjs/gatsby/commit/859e412211364a56ed61da80f43268809d4c9ed9
gatsby serve-build
so you can easily check that your built site is working as expected. https://github.com/gatsbyjs/gatsby/pull/237
Thanks everyone!
Published by KyleAMathews over 8 years ago
Another release with two nice DX improvements.
Also we hit 2500 stars as I was writing this review 🎉
Gatsby started its life on Babel 5 but Babel 6 is out and stable so we'll upgrade along with the rest of the ecosystem and take advantage of its improved performance and awesome new plugin api.
The global Gatsby install now defers to the local install of Gatsby (and throws if it can't find one). This means you can build a site and not worry about needing to upgrade it again as Gatsby accumulates breaking changes. This also helps ensure Gatsby works in environments where you don't want a global install e.g. build servers.
npm install --save gatsby
npm install --save babel-plugin-add-module-exports babel-preset-es2015 babel-preset-react babel-preset-stage-1
and npm install --save-dev babel-preset-react-hmre
.link
function from gatsby-helpers.js
was renamed to prefixLink
to clarify its purpose..babelrc
file needs to be upgraded to look like:{
"presets": ['react', 'es2015', 'stage-1'],
"plugins": ['add-module-exports']
}
gatsby.config.js
, this functionality is now moved to gatsby-node.js
and instead of using module.exports, export your config modification function as modifyWebpackConfig
. See the updated instructions in the README.page.data
, you'll now need check for truthy page.data.body
..gatsby-context.js
.rewritePath
, onRouteChange
hooks in your app.js — app.js is now not supported. Instead you should export rewritePath
in gatsby-node.js
and onRouteChange
in gatsby-browser.js
. The function signatures didn't change. These new files will be gaining more functionality in future releases.That's it! See you in the issue queues :-)
Published by KyleAMathews over 8 years ago
bundle.js
for production. This is helpful to minimize the amount of data people download for your site and for very large sites (e.g. 1000+ pages), not compiling the JS can save a considerable amount of time.Published by KyleAMathews over 8 years ago
html.js
file during dev https://github.com/gatsbyjs/gatsby/pull/176
Published by KyleAMathews over 8 years ago
@scottnonnenberg added support for 404 pages!