Skip to content

Commit

Permalink
Gatsby by default will transform Object.assign
Browse files Browse the repository at this point in the history
This is done to support older browsers. Fixes gatsbyjs#264
  • Loading branch information
benstepp committed May 8, 2016
1 parent 0ca28fb commit cf68f0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils/babel-config.js
Expand Up @@ -7,7 +7,7 @@ import invariant from 'invariant'

const DEFAULT_BABEL_CONFIG = {
presets: ['react', 'es2015', 'stage-0'],
plugins: ['add-module-exports'],
plugins: ['add-module-exports', 'transform-object-assign'],
}

/**
Expand All @@ -31,7 +31,7 @@ function resolvePlugin (pluginName, directory, type) {
You are trying to use a babel plugin which gatsby cannot find. You
can install it using "npm install --save ${name}".
You can use of the gatsby provided plugins without installing them:
You can use of the gatsby provided plugins without installing them:
- babel-plugin-add-module-exports
- babel-preset-es2015
- babel-preset-react
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -14,6 +14,7 @@
"babel-core": "^6.7.6",
"babel-loader": "^6.2.4",
"babel-plugin-add-module-exports": "^0.1.2",
"babel-plugin-transform-object-assign": "^6.8.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-react-hmre": "^1.1.1",
Expand Down

0 comments on commit cf68f0b

Please sign in to comment.