diff --git a/.babel-preset.js b/.babel-preset.js deleted file mode 100644 index 5dd3ad55e929e..0000000000000 --- a/.babel-preset.js +++ /dev/null @@ -1,50 +0,0 @@ -const r = m => require.resolve(m) - -function preset(context, options = {}) { - const { browser = false, debug = false } = options - const { NODE_ENV, BABEL_ENV } = process.env - - const PRODUCTION = (BABEL_ENV || NODE_ENV) === "production" - - const browserConfig = { - useBuiltIns: false, - targets: { - browsers: PRODUCTION - ? [`last 4 versions`, `safari >= 7`, "ie >= 9"] - : [`last 2 versions`, `not ie <= 11`, `not android 4.4.3`], - }, - } - - const nodeConfig = { - targets: { - node: PRODUCTION ? 6.0 : "current", - }, - } - - return { - presets: [ - [ - r("@babel/preset-env"), - Object.assign( - { - loose: true, - debug: !!debug, - useBuiltIns: "entry", - shippedProposals: true, - modules: "commonjs", - }, - browser ? browserConfig : nodeConfig - ), - ], - [r("@babel/preset-react"), { development: !PRODUCTION }], - r("@babel/preset-flow"), - ], - plugins: [ - r("@babel/plugin-proposal-class-properties"), - r("@babel/plugin-proposal-optional-chaining"), - r("@babel/plugin-transform-runtime"), - ], - } -} - -module.exports = preset diff --git a/.babelrc.js b/.babelrc.js index 666c1a0efb70a..4eb42997a778d 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -6,10 +6,8 @@ if (process.env.NODE_ENV !== `test`) { ignore.push(`**/__tests__`) } -const presetAbsPath = require(`path`).join(__dirname, '.babel-preset.js') - module.exports = { sourceMaps: true, - presets: [presetAbsPath], + presets: ["babel-preset-gatsby-package"], ignore, } diff --git a/docs/docs/babel.md b/docs/docs/babel.md index 422101fff18f1..de043dab5d5c2 100644 --- a/docs/docs/babel.md +++ b/docs/docs/babel.md @@ -22,48 +22,25 @@ browsers. ## How to use a custom .babelrc file Gatsby ships with a default .babelrc setup that should work for most sites. If you'd like -to add custom Babel presets or plugins, we recommend copying our default .babelrc below -to the root of your site and modifying it per your needs. +to add custom Babel presets or plugins, you can create your own `.babelrc` at the root of your site, import [`babel-preset-gatsby`](https://github.com/gatsbyjs/gatsby/tree/master/packages/babel-preset-gatsby), and overwrite the `target` option. + +```bash +npm install --save babel-preset-gatsby +``` ```json5:title=.babelrc { presets: [ [ - "@babel/preset-env", + "babel-preset-gatsby", { - loose: true, - modules: false, - useBuiltIns: "usage", - shippedProposals: true, targets: { browsers: [">0.25%", "not dead"], }, }, ], - [ - "@babel/preset-react", - { - useBuiltIns: true, - pragma: "React.createElement", - }, - ], - ], - plugins: [ - [ - "@babel/plugin-proposal-class-properties", - { - loose: true, - }, - ], - "@babel/plugin-syntax-dynamic-import", - "babel-plugin-macros", - [ - "@babel/plugin-transform-runtime", - { - helpers: true, - regenerator: true, - }, - ], ], } ``` + +For more advanced configurations, you can also copy the defaults from [`babel-preset-gatsby`](https://github.com/gatsbyjs/gatsby/tree/master/packages/babel-preset-gatsby) and customize them to suit your needs. diff --git a/docs/docs/testing-css-in-js.md b/docs/docs/testing-css-in-js.md index 5894105407a15..0901e7c95e4ba 100644 --- a/docs/docs/testing-css-in-js.md +++ b/docs/docs/testing-css-in-js.md @@ -22,12 +22,10 @@ If you followed along with the [Unit testing guide](/docs/unit-testing) you'll h ```diff:title=jest-preprocess.js const babelOptions = { - presets: ["@babel/react", "@babel/env"], - plugins: [ + presets: ["babel-preset-gatsby"], ++ plugins: [ + "emotion", - "@babel/plugin-proposal-optional-chaining", - "@babel/plugin-proposal-class-properties", - ], ++ ], } module.exports = require("babel-jest").createTransformer(babelOptions) diff --git a/docs/docs/unit-testing.md b/docs/docs/unit-testing.md index a81df3dd403a8..143d68aa505ef 100644 --- a/docs/docs/unit-testing.md +++ b/docs/docs/unit-testing.md @@ -22,7 +22,7 @@ First you need to install Jest and some more required packages. You need to install Babel 7 as it's required by Jest. ```sh -npm install --save-dev jest babel-jest react-test-renderer identity-obj-proxy 'babel-core@^7.0.0-0' @babel/core @babel/preset-env @babel/preset-react @babel/plugin-proposal-class-properties @babel/plugin-proposal-optional-chaining +npm install --save-dev jest babel-jest react-test-renderer identity-obj-proxy 'babel-core@^7.0.0-0' @babel/core babel-preset-gatsby ``` Because Gatsby handles its own Babel configuration, you will need to manually @@ -61,11 +61,7 @@ with a minimal config. ```js:title=jest-preprocess.js const babelOptions = { - presets: ["@babel/react", "@babel/env"], - plugins: [ - "@babel/plugin-proposal-optional-chaining", - "@babel/plugin-proposal-class-properties", - ], + presets: ["babel-preset-gatsby"], } module.exports = require("babel-jest").createTransformer(babelOptions) diff --git a/jest-transformer.js b/jest-transformer.js index 9db14942ed204..072aba2e1ecc4 100644 --- a/jest-transformer.js +++ b/jest-transformer.js @@ -1,3 +1,2 @@ -const presetAbsPath = require(`path`).join(__dirname, `.babel-preset.js`) -const babelPreset = require(presetAbsPath)() +const babelPreset = require(`babel-preset-gatsby-package`)() module.exports = require(`babel-jest`).createTransformer(babelPreset) diff --git a/jest.config.js b/jest.config.js index 8aa413339ece0..8a7938abadb5d 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,12 +1,15 @@ const path = require(`path`) const glob = require(`glob`) +const fs = require("fs") const pkgs = glob.sync(`./packages/*`).map(p => p.replace(/^\./, ``)) const reGatsby = /gatsby$/ const gatsbyDir = pkgs.find(p => reGatsby.exec(p)) const gatsbyBuildDirs = [`dist`].map(dir => path.join(gatsbyDir, dir)) -const builtTestsDirs = pkgs.map(p => path.join(p, `__tests__`)) +const builtTestsDirs = pkgs + .filter(p => fs.existsSync(path.join(p, `src`))) + .map(p => path.join(p, `__tests__`)) const distDirs = pkgs.map(p => path.join(p, `dist`)) const ignoreDirs = [].concat(gatsbyBuildDirs, builtTestsDirs, distDirs) const coverageDirs = pkgs.map(p => path.join(p, `src/**/*.js`)) @@ -24,7 +27,7 @@ module.exports = { `/node_modules/`, `__tests__/fixtures`, ], - transform: { '^.+\\.js$': `/jest-transformer.js` }, + transform: { "^.+\\.js$": `/jest-transformer.js` }, moduleNameMapper: { "^highlight.js$": `/node_modules/highlight.js/lib/index.js`, }, diff --git a/package.json b/package.json index b2a6a52762463..4e859e90b1aae 100644 --- a/package.json +++ b/package.json @@ -2,12 +2,6 @@ "devDependencies": { "@babel/core": "^7.0.0", "@babel/node": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-proposal-optional-chaining": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/preset-flow": "^7.0.0", - "@babel/preset-react": "^7.0.0", "@babel/runtime": "^7.0.0", "babel-core": "7.0.0-bridge.0", "babel-eslint": "8.2.1", diff --git a/packages/babel-plugin-remove-graphql-queries/.babelrc b/packages/babel-plugin-remove-graphql-queries/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/babel-plugin-remove-graphql-queries/.babelrc +++ b/packages/babel-plugin-remove-graphql-queries/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/babel-plugin-remove-graphql-queries/package.json b/packages/babel-plugin-remove-graphql-queries/package.json index ba6e48c84dff8..ae65da5703140 100644 --- a/packages/babel-plugin-remove-graphql-queries/package.json +++ b/packages/babel-plugin-remove-graphql-queries/package.json @@ -4,7 +4,8 @@ "author": "Jason Quense ", "devDependencies": { "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1" }, "license": "MIT", "main": "index.js", diff --git a/packages/babel-preset-gatsby-package/.gitignore b/packages/babel-preset-gatsby-package/.gitignore index 2132b55e6405e..8ee01d321b721 100644 --- a/packages/babel-preset-gatsby-package/.gitignore +++ b/packages/babel-preset-gatsby-package/.gitignore @@ -1,2 +1 @@ -/*.js yarn.lock diff --git a/packages/babel-preset-gatsby-package/.npmignore b/packages/babel-preset-gatsby-package/.npmignore index e771d2c9fa299..243a16a6c5879 100644 --- a/packages/babel-preset-gatsby-package/.npmignore +++ b/packages/babel-preset-gatsby-package/.npmignore @@ -32,3 +32,6 @@ flow-typed coverage decls examples + +# tests +__tests__ diff --git a/packages/babel-preset-gatsby-package/src/__tests__/index.js b/packages/babel-preset-gatsby-package/__tests__/index.js similarity index 100% rename from packages/babel-preset-gatsby-package/src/__tests__/index.js rename to packages/babel-preset-gatsby-package/__tests__/index.js diff --git a/packages/babel-preset-gatsby-package/src/index.js b/packages/babel-preset-gatsby-package/index.js similarity index 100% rename from packages/babel-preset-gatsby-package/src/index.js rename to packages/babel-preset-gatsby-package/index.js diff --git a/packages/babel-preset-gatsby-package/package.json b/packages/babel-preset-gatsby-package/package.json index 2c534a7f29a86..0979a3d13326d 100644 --- a/packages/babel-preset-gatsby-package/package.json +++ b/packages/babel-preset-gatsby-package/package.json @@ -11,5 +11,5 @@ "@babel/preset-react": "^7.0.0" }, "license": "MIT", - "main": "src/index.js" + "main": "index.js" } diff --git a/packages/babel-preset-gatsby/package.json b/packages/babel-preset-gatsby/package.json index 20785291afa4c..3a06336b76dd1 100644 --- a/packages/babel-preset-gatsby/package.json +++ b/packages/babel-preset-gatsby/package.json @@ -16,5 +16,8 @@ "build": "babel src --out-dir . --ignore **/__tests__", "prepare": "cross-env NODE_ENV=production npm run build", "watch": "babel -w src --out-dir . --ignore **/__tests__" + }, + "devDependencies": { + "babel-preset-gatsby-package": "^0.1.1" } } diff --git a/packages/gatsby-cli/.babelrc b/packages/gatsby-cli/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-cli/.babelrc +++ b/packages/gatsby-cli/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-cli/package.json b/packages/gatsby-cli/package.json index 8795ecb273544..2571f95977273 100644 --- a/packages/gatsby-cli/package.json +++ b/packages/gatsby-cli/package.json @@ -34,6 +34,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "files": [ diff --git a/packages/gatsby-codemods/.babelrc b/packages/gatsby-codemods/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-codemods/.babelrc +++ b/packages/gatsby-codemods/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-codemods/package.json b/packages/gatsby-codemods/package.json index f12d55bb36c71..6462d7e9ef613 100644 --- a/packages/gatsby-codemods/package.json +++ b/packages/gatsby-codemods/package.json @@ -28,6 +28,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.0.5", "jscodeshift": "^0.5.1" }, diff --git a/packages/gatsby-dev-cli/.babelrc b/packages/gatsby-dev-cli/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-dev-cli/.babelrc +++ b/packages/gatsby-dev-cli/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-dev-cli/package.json b/packages/gatsby-dev-cli/package.json index 008a4d9d8533b..c0b82a3347a60 100644 --- a/packages/gatsby-dev-cli/package.json +++ b/packages/gatsby-dev-cli/package.json @@ -21,6 +21,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.0.5" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-dev-cli#readme", diff --git a/packages/gatsby-image/.babelrc b/packages/gatsby-image/.babelrc index 49f11f3ac4077..c5aaeee07bfaf 100644 --- a/packages/gatsby-image/.babelrc +++ b/packages/gatsby-image/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-image/package.json b/packages/gatsby-image/package.json index bc1e8b35fbdd5..cd9f780bb49e5 100644 --- a/packages/gatsby-image/package.json +++ b/packages/gatsby-image/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "react-testing-library": "^5.0.0" }, diff --git a/packages/gatsby-link/.babelrc b/packages/gatsby-link/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-link/.babelrc +++ b/packages/gatsby-link/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-link/package.json b/packages/gatsby-link/package.json index 541eab7eac2ca..91f1907b6dc49 100644 --- a/packages/gatsby-link/package.json +++ b/packages/gatsby-link/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "react-testing-library": "^5.0.0" }, diff --git a/packages/gatsby-plugin-canonical-urls/.babelrc b/packages/gatsby-plugin-canonical-urls/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-canonical-urls/.babelrc +++ b/packages/gatsby-plugin-canonical-urls/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-canonical-urls/package.json b/packages/gatsby-plugin-canonical-urls/package.json index b0fbff3e414f7..9a328e5c62967 100644 --- a/packages/gatsby-plugin-canonical-urls/package.json +++ b/packages/gatsby-plugin-canonical-urls/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-canonical-urls#readme", diff --git a/packages/gatsby-plugin-catch-links/.babelrc b/packages/gatsby-plugin-catch-links/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-catch-links/.babelrc +++ b/packages/gatsby-plugin-catch-links/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-catch-links/package.json b/packages/gatsby-plugin-catch-links/package.json index a2ccdd554f2c6..7b7e90eb7d0dc 100644 --- a/packages/gatsby-plugin-catch-links/package.json +++ b/packages/gatsby-plugin-catch-links/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-catch-links#readme", diff --git a/packages/gatsby-plugin-coffeescript/.babelrc b/packages/gatsby-plugin-coffeescript/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-coffeescript/.babelrc +++ b/packages/gatsby-plugin-coffeescript/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-coffeescript/package.json b/packages/gatsby-plugin-coffeescript/package.json index 280957b49e13c..734d6e7af23b6 100644 --- a/packages/gatsby-plugin-coffeescript/package.json +++ b/packages/gatsby-plugin-coffeescript/package.json @@ -18,6 +18,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-coffeescript#readme", diff --git a/packages/gatsby-plugin-create-client-paths/.babelrc b/packages/gatsby-plugin-create-client-paths/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-create-client-paths/.babelrc +++ b/packages/gatsby-plugin-create-client-paths/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-create-client-paths/package.json b/packages/gatsby-plugin-create-client-paths/package.json index 1d52949e4d5f3..f861bb930bfc3 100644 --- a/packages/gatsby-plugin-create-client-paths/package.json +++ b/packages/gatsby-plugin-create-client-paths/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-create-client-paths#readme", diff --git a/packages/gatsby-plugin-emotion/.babelrc b/packages/gatsby-plugin-emotion/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-emotion/.babelrc +++ b/packages/gatsby-plugin-emotion/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-emotion/package.json b/packages/gatsby-plugin-emotion/package.json index 3f7bc85569b9a..8c9e87df3529a 100644 --- a/packages/gatsby-plugin-emotion/package.json +++ b/packages/gatsby-plugin-emotion/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-emotion#readme", diff --git a/packages/gatsby-plugin-facebook-analytics/.babelrc b/packages/gatsby-plugin-facebook-analytics/.babelrc index 9235a2c260ca8..31043522b2321 100644 --- a/packages/gatsby-plugin-facebook-analytics/.babelrc +++ b/packages/gatsby-plugin-facebook-analytics/.babelrc @@ -1,3 +1,3 @@ { - "presets": [["../../.babel-preset.js", { "browser": true }]] + "presets": [["babel-preset-gatsby-package", { "browser": true }]] } diff --git a/packages/gatsby-plugin-facebook-analytics/package.json b/packages/gatsby-plugin-facebook-analytics/package.json index c69acd6db853b..21d0093355371 100644 --- a/packages/gatsby-plugin-facebook-analytics/package.json +++ b/packages/gatsby-plugin-facebook-analytics/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-facebook-analytics#readme", diff --git a/packages/gatsby-plugin-feed/.babelrc b/packages/gatsby-plugin-feed/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-feed/.babelrc +++ b/packages/gatsby-plugin-feed/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-feed/package.json b/packages/gatsby-plugin-feed/package.json index 08ff1a24f574e..34b45b79ad341 100644 --- a/packages/gatsby-plugin-feed/package.json +++ b/packages/gatsby-plugin-feed/package.json @@ -16,6 +16,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-feed#readme", diff --git a/packages/gatsby-plugin-fullstory/.babelrc b/packages/gatsby-plugin-fullstory/.babelrc index 9235a2c260ca8..31043522b2321 100644 --- a/packages/gatsby-plugin-fullstory/.babelrc +++ b/packages/gatsby-plugin-fullstory/.babelrc @@ -1,3 +1,3 @@ { - "presets": [["../../.babel-preset.js", { "browser": true }]] + "presets": [["babel-preset-gatsby-package", { "browser": true }]] } diff --git a/packages/gatsby-plugin-fullstory/package.json b/packages/gatsby-plugin-fullstory/package.json index 29bd98126b7e9..49772d09f2f71 100644 --- a/packages/gatsby-plugin-fullstory/package.json +++ b/packages/gatsby-plugin-fullstory/package.json @@ -28,6 +28,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "peerDependencies": { diff --git a/packages/gatsby-plugin-glamor/.babelrc b/packages/gatsby-plugin-glamor/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-glamor/.babelrc +++ b/packages/gatsby-plugin-glamor/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-glamor/package.json b/packages/gatsby-plugin-glamor/package.json index da0536722234f..ed628a6dad2fd 100644 --- a/packages/gatsby-plugin-glamor/package.json +++ b/packages/gatsby-plugin-glamor/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-glamor#readme", diff --git a/packages/gatsby-plugin-google-analytics/.babelrc b/packages/gatsby-plugin-google-analytics/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-google-analytics/.babelrc +++ b/packages/gatsby-plugin-google-analytics/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-google-analytics/package.json b/packages/gatsby-plugin-google-analytics/package.json index ca2d67ab365bc..0b0b62a0fcbb2 100644 --- a/packages/gatsby-plugin-google-analytics/package.json +++ b/packages/gatsby-plugin-google-analytics/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-analytics#readme", diff --git a/packages/gatsby-plugin-google-gtag/.babelrc b/packages/gatsby-plugin-google-gtag/.babelrc index 61247365a9c31..c5aaeee07bfaf 100644 --- a/packages/gatsby-plugin-google-gtag/.babelrc +++ b/packages/gatsby-plugin-google-gtag/.babelrc @@ -1,6 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } - diff --git a/packages/gatsby-plugin-google-gtag/package.json b/packages/gatsby-plugin-google-gtag/package.json index 8a280da72ddd1..05d300a347530 100644 --- a/packages/gatsby-plugin-google-gtag/package.json +++ b/packages/gatsby-plugin-google-gtag/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-gtag#readme", diff --git a/packages/gatsby-plugin-google-tagmanager/.babelrc b/packages/gatsby-plugin-google-tagmanager/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-google-tagmanager/.babelrc +++ b/packages/gatsby-plugin-google-tagmanager/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-google-tagmanager/package.json b/packages/gatsby-plugin-google-tagmanager/package.json index 35b796f8f98a0..f51d88d4fe92a 100644 --- a/packages/gatsby-plugin-google-tagmanager/package.json +++ b/packages/gatsby-plugin-google-tagmanager/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-google-tagmanager#readme", diff --git a/packages/gatsby-plugin-guess-js/.babelrc b/packages/gatsby-plugin-guess-js/.babelrc index 49f11f3ac4077..c5aaeee07bfaf 100644 --- a/packages/gatsby-plugin-guess-js/.babelrc +++ b/packages/gatsby-plugin-guess-js/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-guess-js/package.json b/packages/gatsby-plugin-guess-js/package.json index 6d3a046df02b8..d7b683fb58f23 100644 --- a/packages/gatsby-plugin-guess-js/package.json +++ b/packages/gatsby-plugin-guess-js/package.json @@ -33,6 +33,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.0.5" }, "peerDependencies": { diff --git a/packages/gatsby-plugin-jss/.babelrc b/packages/gatsby-plugin-jss/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-jss/.babelrc +++ b/packages/gatsby-plugin-jss/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-jss/package.json b/packages/gatsby-plugin-jss/package.json index 1f690fbbad211..6b11c46e89f4f 100644 --- a/packages/gatsby-plugin-jss/package.json +++ b/packages/gatsby-plugin-jss/package.json @@ -11,7 +11,8 @@ }, "devDependencies": { "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-jss#readme", "keywords": [ diff --git a/packages/gatsby-plugin-layout/.babelrc b/packages/gatsby-plugin-layout/.babelrc index 49f11f3ac4077..c5aaeee07bfaf 100644 --- a/packages/gatsby-plugin-layout/.babelrc +++ b/packages/gatsby-plugin-layout/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-layout/package.json b/packages/gatsby-plugin-layout/package.json index 163d08f3e1d5c..5fd027020110d 100644 --- a/packages/gatsby-plugin-layout/package.json +++ b/packages/gatsby-plugin-layout/package.json @@ -28,6 +28,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.0.5" } } diff --git a/packages/gatsby-plugin-less/.babelrc b/packages/gatsby-plugin-less/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-less/.babelrc +++ b/packages/gatsby-plugin-less/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-less/package.json b/packages/gatsby-plugin-less/package.json index bfeff38cdad42..8ce15e4750c02 100644 --- a/packages/gatsby-plugin-less/package.json +++ b/packages/gatsby-plugin-less/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-less#readme", diff --git a/packages/gatsby-plugin-lodash/.babelrc b/packages/gatsby-plugin-lodash/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-lodash/.babelrc +++ b/packages/gatsby-plugin-lodash/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-lodash/package.json b/packages/gatsby-plugin-lodash/package.json index 6e18a1ce61025..d908af23583c2 100644 --- a/packages/gatsby-plugin-lodash/package.json +++ b/packages/gatsby-plugin-lodash/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-lodash#readme", diff --git a/packages/gatsby-plugin-manifest/.babelrc b/packages/gatsby-plugin-manifest/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-manifest/.babelrc +++ b/packages/gatsby-plugin-manifest/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-manifest/package.json b/packages/gatsby-plugin-manifest/package.json index 1c4cd92402c93..62de64ecb47e4 100644 --- a/packages/gatsby-plugin-manifest/package.json +++ b/packages/gatsby-plugin-manifest/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-manifest#readme", diff --git a/packages/gatsby-plugin-netlify-cms/.babelrc b/packages/gatsby-plugin-netlify-cms/.babelrc index 49f11f3ac4077..c5aaeee07bfaf 100644 --- a/packages/gatsby-plugin-netlify-cms/.babelrc +++ b/packages/gatsby-plugin-netlify-cms/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-netlify-cms/package.json b/packages/gatsby-plugin-netlify-cms/package.json index 47e725a63002f..214fcd5a3d564 100644 --- a/packages/gatsby-plugin-netlify-cms/package.json +++ b/packages/gatsby-plugin-netlify-cms/package.json @@ -18,6 +18,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "react": "^16.4.1", "react-dom": "^16.4.1" diff --git a/packages/gatsby-plugin-netlify/.babelrc b/packages/gatsby-plugin-netlify/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-netlify/.babelrc +++ b/packages/gatsby-plugin-netlify/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-netlify/package.json b/packages/gatsby-plugin-netlify/package.json index 7e1c257e2e02e..bfb4850bca972 100644 --- a/packages/gatsby-plugin-netlify/package.json +++ b/packages/gatsby-plugin-netlify/package.json @@ -22,6 +22,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-netlify#readme", diff --git a/packages/gatsby-plugin-nprogress/.babelrc b/packages/gatsby-plugin-nprogress/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-nprogress/.babelrc +++ b/packages/gatsby-plugin-nprogress/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-nprogress/package.json b/packages/gatsby-plugin-nprogress/package.json index 0936755ba6ab6..277ff89c9ff54 100644 --- a/packages/gatsby-plugin-nprogress/package.json +++ b/packages/gatsby-plugin-nprogress/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-nprogress#readme", diff --git a/packages/gatsby-plugin-offline/.babelrc b/packages/gatsby-plugin-offline/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-offline/.babelrc +++ b/packages/gatsby-plugin-offline/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-offline/package.json b/packages/gatsby-plugin-offline/package.json index 4ed0c2108718f..7e7a5861e47d1 100644 --- a/packages/gatsby-plugin-offline/package.json +++ b/packages/gatsby-plugin-offline/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-offline#readme", diff --git a/packages/gatsby-plugin-page-creator/.babelrc b/packages/gatsby-plugin-page-creator/.babelrc index f79d788caba2c..31043522b2321 100644 --- a/packages/gatsby-plugin-page-creator/.babelrc +++ b/packages/gatsby-plugin-page-creator/.babelrc @@ -1,3 +1,3 @@ { - presets: [["../../.babel-preset.js", { browser: true }]], + "presets": [["babel-preset-gatsby-package", { "browser": true }]] } diff --git a/packages/gatsby-plugin-page-creator/package.json b/packages/gatsby-plugin-page-creator/package.json index f69ebe4dc9c19..27bd71ef45cbf 100644 --- a/packages/gatsby-plugin-page-creator/package.json +++ b/packages/gatsby-plugin-page-creator/package.json @@ -30,6 +30,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.0.5" }, "peerDependencies": { diff --git a/packages/gatsby-plugin-postcss/.babelrc b/packages/gatsby-plugin-postcss/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-postcss/.babelrc +++ b/packages/gatsby-plugin-postcss/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-postcss/package.json b/packages/gatsby-plugin-postcss/package.json index 521a5a2b2ac01..aa14c41c11627 100644 --- a/packages/gatsby-plugin-postcss/package.json +++ b/packages/gatsby-plugin-postcss/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-postcss#readme", diff --git a/packages/gatsby-plugin-preact/.babelrc b/packages/gatsby-plugin-preact/.babelrc index 49f11f3ac4077..c5aaeee07bfaf 100644 --- a/packages/gatsby-plugin-preact/.babelrc +++ b/packages/gatsby-plugin-preact/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-preact/package.json b/packages/gatsby-plugin-preact/package.json index 846c7addc4e10..113acd75fcf56 100644 --- a/packages/gatsby-plugin-preact/package.json +++ b/packages/gatsby-plugin-preact/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-preact#readme", diff --git a/packages/gatsby-plugin-react-css-modules/.babelrc b/packages/gatsby-plugin-react-css-modules/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-react-css-modules/.babelrc +++ b/packages/gatsby-plugin-react-css-modules/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-react-css-modules/package.json b/packages/gatsby-plugin-react-css-modules/package.json index cb223c6de0241..f5748941b43f1 100644 --- a/packages/gatsby-plugin-react-css-modules/package.json +++ b/packages/gatsby-plugin-react-css-modules/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-react-css-modules#readme", diff --git a/packages/gatsby-plugin-react-helmet/.babelrc b/packages/gatsby-plugin-react-helmet/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-react-helmet/.babelrc +++ b/packages/gatsby-plugin-react-helmet/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-react-helmet/package.json b/packages/gatsby-plugin-react-helmet/package.json index 211c913752afb..1819aa0ff22ea 100644 --- a/packages/gatsby-plugin-react-helmet/package.json +++ b/packages/gatsby-plugin-react-helmet/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-react-helmet#readme", diff --git a/packages/gatsby-plugin-remove-trailing-slashes/.babelrc b/packages/gatsby-plugin-remove-trailing-slashes/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-remove-trailing-slashes/.babelrc +++ b/packages/gatsby-plugin-remove-trailing-slashes/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-remove-trailing-slashes/package.json b/packages/gatsby-plugin-remove-trailing-slashes/package.json index 84b93ae33fdf0..5f834aaad196f 100644 --- a/packages/gatsby-plugin-remove-trailing-slashes/package.json +++ b/packages/gatsby-plugin-remove-trailing-slashes/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-remove-trailing-slashes#readme", diff --git a/packages/gatsby-plugin-sass/.babelrc b/packages/gatsby-plugin-sass/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-sass/.babelrc +++ b/packages/gatsby-plugin-sass/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-sass/package.json b/packages/gatsby-plugin-sass/package.json index 24bde263c5b5e..359ce7afd6700 100644 --- a/packages/gatsby-plugin-sass/package.json +++ b/packages/gatsby-plugin-sass/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-sass#readme", diff --git a/packages/gatsby-plugin-sharp/.babelrc b/packages/gatsby-plugin-sharp/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-sharp/.babelrc +++ b/packages/gatsby-plugin-sharp/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-sharp/package.json b/packages/gatsby-plugin-sharp/package.json index ab6ce2a4fd467..c985bb8decae7 100644 --- a/packages/gatsby-plugin-sharp/package.json +++ b/packages/gatsby-plugin-sharp/package.json @@ -26,6 +26,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-sharp#readme", diff --git a/packages/gatsby-plugin-sitemap/.babelrc b/packages/gatsby-plugin-sitemap/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-sitemap/.babelrc +++ b/packages/gatsby-plugin-sitemap/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-sitemap/package.json b/packages/gatsby-plugin-sitemap/package.json index 8e8a0d5513440..e0c96dc3f0cb2 100644 --- a/packages/gatsby-plugin-sitemap/package.json +++ b/packages/gatsby-plugin-sitemap/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-sitemap#readme", diff --git a/packages/gatsby-plugin-styled-components/.babelrc b/packages/gatsby-plugin-styled-components/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-styled-components/.babelrc +++ b/packages/gatsby-plugin-styled-components/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-styled-components/package.json b/packages/gatsby-plugin-styled-components/package.json index e9b3bd94d7ec7..9abde5dd2b6a7 100644 --- a/packages/gatsby-plugin-styled-components/package.json +++ b/packages/gatsby-plugin-styled-components/package.json @@ -11,7 +11,8 @@ }, "devDependencies": { "@babel/cli": "^7.0.0", - "@babel/core": "^7.0.0" + "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-styled-components#readme", "keywords": [ diff --git a/packages/gatsby-plugin-styled-jsx/.babelrc b/packages/gatsby-plugin-styled-jsx/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-styled-jsx/.babelrc +++ b/packages/gatsby-plugin-styled-jsx/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-styled-jsx/package.json b/packages/gatsby-plugin-styled-jsx/package.json index e1002c4c6fd66..03623bb7e0899 100644 --- a/packages/gatsby-plugin-styled-jsx/package.json +++ b/packages/gatsby-plugin-styled-jsx/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-styled-jsx#readme", diff --git a/packages/gatsby-plugin-styletron/.babelrc b/packages/gatsby-plugin-styletron/.babelrc index 49f11f3ac4077..c5aaeee07bfaf 100644 --- a/packages/gatsby-plugin-styletron/.babelrc +++ b/packages/gatsby-plugin-styletron/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-styletron/package.json b/packages/gatsby-plugin-styletron/package.json index 276bebc2a48e6..b67b1a603adc6 100644 --- a/packages/gatsby-plugin-styletron/package.json +++ b/packages/gatsby-plugin-styletron/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-styletron#readme", diff --git a/packages/gatsby-plugin-stylus/.babelrc b/packages/gatsby-plugin-stylus/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-stylus/.babelrc +++ b/packages/gatsby-plugin-stylus/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-stylus/package.json b/packages/gatsby-plugin-stylus/package.json index 7abffe3cfc1bc..9765ccc946028 100644 --- a/packages/gatsby-plugin-stylus/package.json +++ b/packages/gatsby-plugin-stylus/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-stylus#readme", diff --git a/packages/gatsby-plugin-subfont/.babelrc b/packages/gatsby-plugin-subfont/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-subfont/.babelrc +++ b/packages/gatsby-plugin-subfont/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-subfont/package.json b/packages/gatsby-plugin-subfont/package.json index 9aa7ff19b819a..9b4d1386c3343 100644 --- a/packages/gatsby-plugin-subfont/package.json +++ b/packages/gatsby-plugin-subfont/package.json @@ -29,6 +29,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.0.5" } } diff --git a/packages/gatsby-plugin-twitter/.babelrc b/packages/gatsby-plugin-twitter/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-twitter/.babelrc +++ b/packages/gatsby-plugin-twitter/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-twitter/package.json b/packages/gatsby-plugin-twitter/package.json index fb355cb3ec900..4e402495a6887 100644 --- a/packages/gatsby-plugin-twitter/package.json +++ b/packages/gatsby-plugin-twitter/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-twitter#readme", diff --git a/packages/gatsby-plugin-typescript/.babelrc b/packages/gatsby-plugin-typescript/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-plugin-typescript/.babelrc +++ b/packages/gatsby-plugin-typescript/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-plugin-typescript/package.json b/packages/gatsby-plugin-typescript/package.json index 2b4fac589cd5a..89536c4ef2220 100644 --- a/packages/gatsby-plugin-typescript/package.json +++ b/packages/gatsby-plugin-typescript/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-typescript#readme", diff --git a/packages/gatsby-plugin-typography/.babelrc b/packages/gatsby-plugin-typography/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-plugin-typography/.babelrc +++ b/packages/gatsby-plugin-typography/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-plugin-typography/package.json b/packages/gatsby-plugin-typography/package.json index 34a1cfe01365b..28a98f1d867b1 100644 --- a/packages/gatsby-plugin-typography/package.json +++ b/packages/gatsby-plugin-typography/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-typography#readme", diff --git a/packages/gatsby-react-router-scroll/.babelrc b/packages/gatsby-react-router-scroll/.babelrc index 201b1bdc8da7c..e437418264e89 100644 --- a/packages/gatsby-react-router-scroll/.babelrc +++ b/packages/gatsby-react-router-scroll/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ], "plugins": ["dev-expression"] } diff --git a/packages/gatsby-react-router-scroll/package.json b/packages/gatsby-react-router-scroll/package.json index 57927d64e3551..2459fe55e799f 100644 --- a/packages/gatsby-react-router-scroll/package.json +++ b/packages/gatsby-react-router-scroll/package.json @@ -15,6 +15,7 @@ "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", "babel-plugin-dev-expression": "^0.2.1", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-react-router-scroll#readme", diff --git a/packages/gatsby-remark-autolink-headers/.babelrc b/packages/gatsby-remark-autolink-headers/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-remark-autolink-headers/.babelrc +++ b/packages/gatsby-remark-autolink-headers/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-remark-autolink-headers/package.json b/packages/gatsby-remark-autolink-headers/package.json index 0e5a4236e0f9e..01bcfeb3da38c 100644 --- a/packages/gatsby-remark-autolink-headers/package.json +++ b/packages/gatsby-remark-autolink-headers/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-autolink-headers#readme", diff --git a/packages/gatsby-remark-code-repls/.babelrc b/packages/gatsby-remark-code-repls/.babelrc index 49f11f3ac4077..c5aaeee07bfaf 100644 --- a/packages/gatsby-remark-code-repls/.babelrc +++ b/packages/gatsby-remark-code-repls/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-remark-code-repls/package.json b/packages/gatsby-remark-code-repls/package.json index 7e403f9de3efa..16025549223ec 100644 --- a/packages/gatsby-remark-code-repls/package.json +++ b/packages/gatsby-remark-code-repls/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-code-repls#readme", diff --git a/packages/gatsby-remark-copy-linked-files/.babelrc b/packages/gatsby-remark-copy-linked-files/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-remark-copy-linked-files/.babelrc +++ b/packages/gatsby-remark-copy-linked-files/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-remark-copy-linked-files/package.json b/packages/gatsby-remark-copy-linked-files/package.json index df7f4bac8a3de..61acc7be5cfc7 100644 --- a/packages/gatsby-remark-copy-linked-files/package.json +++ b/packages/gatsby-remark-copy-linked-files/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-copy-linked-files#readme", diff --git a/packages/gatsby-remark-custom-blocks/.babelrc b/packages/gatsby-remark-custom-blocks/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-remark-custom-blocks/.babelrc +++ b/packages/gatsby-remark-custom-blocks/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-remark-custom-blocks/package.json b/packages/gatsby-remark-custom-blocks/package.json index c7a13a465c77a..baeafe87a5429 100644 --- a/packages/gatsby-remark-custom-blocks/package.json +++ b/packages/gatsby-remark-custom-blocks/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "rimraf": "^2.6.2", "unist-util-find": "^1.0.1" diff --git a/packages/gatsby-remark-embed-snippet/.babelrc b/packages/gatsby-remark-embed-snippet/.babelrc index 49f11f3ac4077..c5aaeee07bfaf 100644 --- a/packages/gatsby-remark-embed-snippet/.babelrc +++ b/packages/gatsby-remark-embed-snippet/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-remark-embed-snippet/package.json b/packages/gatsby-remark-embed-snippet/package.json index c28dcf821c614..cdb7d5b40daec 100644 --- a/packages/gatsby-remark-embed-snippet/package.json +++ b/packages/gatsby-remark-embed-snippet/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-embed-snippet#readme", diff --git a/packages/gatsby-remark-graphviz/.babelrc b/packages/gatsby-remark-graphviz/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-remark-graphviz/.babelrc +++ b/packages/gatsby-remark-graphviz/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-remark-graphviz/package.json b/packages/gatsby-remark-graphviz/package.json index f353376f792ad..d2ff2c4e1acd9 100644 --- a/packages/gatsby-remark-graphviz/package.json +++ b/packages/gatsby-remark-graphviz/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "rimraf": "^2.6.2", "unist-util-find": "^1.0.1" diff --git a/packages/gatsby-remark-images/.babelrc b/packages/gatsby-remark-images/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-remark-images/.babelrc +++ b/packages/gatsby-remark-images/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-remark-images/package.json b/packages/gatsby-remark-images/package.json index 02145341369ab..228139e3eea61 100644 --- a/packages/gatsby-remark-images/package.json +++ b/packages/gatsby-remark-images/package.json @@ -18,6 +18,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-images#readme", diff --git a/packages/gatsby-remark-katex/.babelrc b/packages/gatsby-remark-katex/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-remark-katex/.babelrc +++ b/packages/gatsby-remark-katex/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-remark-katex/package.json b/packages/gatsby-remark-katex/package.json index 76b940ad019dd..debf6931dc6ba 100644 --- a/packages/gatsby-remark-katex/package.json +++ b/packages/gatsby-remark-katex/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-katex#readme", diff --git a/packages/gatsby-remark-prismjs/.babelrc b/packages/gatsby-remark-prismjs/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-remark-prismjs/.babelrc +++ b/packages/gatsby-remark-prismjs/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-remark-prismjs/package.json b/packages/gatsby-remark-prismjs/package.json index 24eaffa982bf1..118887a42c6bb 100644 --- a/packages/gatsby-remark-prismjs/package.json +++ b/packages/gatsby-remark-prismjs/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "prismjs": "^1.15.0", "remark": "^9.0.0" diff --git a/packages/gatsby-remark-responsive-iframe/.babelrc b/packages/gatsby-remark-responsive-iframe/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-remark-responsive-iframe/.babelrc +++ b/packages/gatsby-remark-responsive-iframe/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-remark-responsive-iframe/package.json b/packages/gatsby-remark-responsive-iframe/package.json index 2bf4671fa1834..fcddfb8cb79cc 100644 --- a/packages/gatsby-remark-responsive-iframe/package.json +++ b/packages/gatsby-remark-responsive-iframe/package.json @@ -16,6 +16,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "remark": "^9.0.0", "unist-util-find": "^1.0.1" diff --git a/packages/gatsby-remark-smartypants/.babelrc b/packages/gatsby-remark-smartypants/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-remark-smartypants/.babelrc +++ b/packages/gatsby-remark-smartypants/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-remark-smartypants/package.json b/packages/gatsby-remark-smartypants/package.json index 0bc58b2beb94d..d1e80648a3c59 100644 --- a/packages/gatsby-remark-smartypants/package.json +++ b/packages/gatsby-remark-smartypants/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-remark-smartypants#readme", diff --git a/packages/gatsby-source-contentful/.babelrc b/packages/gatsby-source-contentful/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-contentful/.babelrc +++ b/packages/gatsby-source-contentful/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-contentful/package.json b/packages/gatsby-source-contentful/package.json index af8c48f2aa224..28f113b232ae7 100644 --- a/packages/gatsby-source-contentful/package.json +++ b/packages/gatsby-source-contentful/package.json @@ -23,6 +23,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-contentful#readme", diff --git a/packages/gatsby-source-drupal/.babelrc b/packages/gatsby-source-drupal/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-drupal/.babelrc +++ b/packages/gatsby-source-drupal/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-drupal/package.json b/packages/gatsby-source-drupal/package.json index 3073739211f60..9da8a60de4ded 100644 --- a/packages/gatsby-source-drupal/package.json +++ b/packages/gatsby-source-drupal/package.json @@ -16,6 +16,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-drupal#readme", diff --git a/packages/gatsby-source-faker/.babelrc b/packages/gatsby-source-faker/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-faker/.babelrc +++ b/packages/gatsby-source-faker/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-faker/package.json b/packages/gatsby-source-faker/package.json index 835be8a163faf..500de2be7bb83 100644 --- a/packages/gatsby-source-faker/package.json +++ b/packages/gatsby-source-faker/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-faker#readme", diff --git a/packages/gatsby-source-filesystem/.babelrc b/packages/gatsby-source-filesystem/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-filesystem/.babelrc +++ b/packages/gatsby-source-filesystem/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-filesystem/package.json b/packages/gatsby-source-filesystem/package.json index e45e7ef4a610d..b406b140c0362 100644 --- a/packages/gatsby-source-filesystem/package.json +++ b/packages/gatsby-source-filesystem/package.json @@ -23,6 +23,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-filesystem#readme", diff --git a/packages/gatsby-source-graphql/.babelrc b/packages/gatsby-source-graphql/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-graphql/.babelrc +++ b/packages/gatsby-source-graphql/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-graphql/package.json b/packages/gatsby-source-graphql/package.json index 2f7e09eda902a..37dc9421f908e 100644 --- a/packages/gatsby-source-graphql/package.json +++ b/packages/gatsby-source-graphql/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-graphql#readme", diff --git a/packages/gatsby-source-hacker-news/.babelrc b/packages/gatsby-source-hacker-news/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-hacker-news/.babelrc +++ b/packages/gatsby-source-hacker-news/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-hacker-news/package.json b/packages/gatsby-source-hacker-news/package.json index 98c1d0ede92ab..f43a6987f8b6f 100644 --- a/packages/gatsby-source-hacker-news/package.json +++ b/packages/gatsby-source-hacker-news/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-hacker-news#readme", diff --git a/packages/gatsby-source-lever/.babelrc b/packages/gatsby-source-lever/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-lever/.babelrc +++ b/packages/gatsby-source-lever/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-lever/package.json b/packages/gatsby-source-lever/package.json index bc861598488f7..60e7b22a07755 100644 --- a/packages/gatsby-source-lever/package.json +++ b/packages/gatsby-source-lever/package.json @@ -20,6 +20,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-lever#readme", diff --git a/packages/gatsby-source-medium/.babelrc b/packages/gatsby-source-medium/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-medium/.babelrc +++ b/packages/gatsby-source-medium/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-medium/package.json b/packages/gatsby-source-medium/package.json index 918b2a144bee4..1a6a74ae1b5fb 100644 --- a/packages/gatsby-source-medium/package.json +++ b/packages/gatsby-source-medium/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-medium#readme", diff --git a/packages/gatsby-source-mongodb/.babelrc b/packages/gatsby-source-mongodb/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-mongodb/.babelrc +++ b/packages/gatsby-source-mongodb/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-mongodb/package.json b/packages/gatsby-source-mongodb/package.json index 60466ea5fb3c3..c7a98981d389e 100644 --- a/packages/gatsby-source-mongodb/package.json +++ b/packages/gatsby-source-mongodb/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-mongodb#readme", diff --git a/packages/gatsby-source-npm-package-search/.babelrc b/packages/gatsby-source-npm-package-search/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-npm-package-search/.babelrc +++ b/packages/gatsby-source-npm-package-search/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-npm-package-search/package.json b/packages/gatsby-source-npm-package-search/package.json index db4ead25b9dba..02f499d813425 100644 --- a/packages/gatsby-source-npm-package-search/package.json +++ b/packages/gatsby-source-npm-package-search/package.json @@ -10,6 +10,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "keywords": [ diff --git a/packages/gatsby-source-wikipedia/.babelrc b/packages/gatsby-source-wikipedia/.babelrc index 49f11f3ac4077..c5aaeee07bfaf 100644 --- a/packages/gatsby-source-wikipedia/.babelrc +++ b/packages/gatsby-source-wikipedia/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-source-wikipedia/package.json b/packages/gatsby-source-wikipedia/package.json index 7f1b18eb4080b..e83a02a84de7b 100644 --- a/packages/gatsby-source-wikipedia/package.json +++ b/packages/gatsby-source-wikipedia/package.json @@ -34,6 +34,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.0.5" } } diff --git a/packages/gatsby-source-wordpress/.babelrc b/packages/gatsby-source-wordpress/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-source-wordpress/.babelrc +++ b/packages/gatsby-source-wordpress/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-source-wordpress/package.json b/packages/gatsby-source-wordpress/package.json index 63fe241b157b3..67a5ced29dbbb 100644 --- a/packages/gatsby-source-wordpress/package.json +++ b/packages/gatsby-source-wordpress/package.json @@ -24,6 +24,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-wordpress#readme", diff --git a/packages/gatsby-transformer-csv/.babelrc b/packages/gatsby-transformer-csv/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-csv/.babelrc +++ b/packages/gatsby-transformer-csv/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-csv/package.json b/packages/gatsby-transformer-csv/package.json index 5776f75ccc7be..50291991676f0 100644 --- a/packages/gatsby-transformer-csv/package.json +++ b/packages/gatsby-transformer-csv/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "json2csv": "^3.7" }, diff --git a/packages/gatsby-transformer-documentationjs/.babelrc b/packages/gatsby-transformer-documentationjs/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-documentationjs/.babelrc +++ b/packages/gatsby-transformer-documentationjs/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-documentationjs/package.json b/packages/gatsby-transformer-documentationjs/package.json index a44e4493f83ee..63969977a9a3f 100644 --- a/packages/gatsby-transformer-documentationjs/package.json +++ b/packages/gatsby-transformer-documentationjs/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-documentationjs#readme", diff --git a/packages/gatsby-transformer-excel/.babelrc b/packages/gatsby-transformer-excel/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-excel/.babelrc +++ b/packages/gatsby-transformer-excel/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-excel/package.json b/packages/gatsby-transformer-excel/package.json index ca266d90a0649..4f455dd94eaa1 100644 --- a/packages/gatsby-transformer-excel/package.json +++ b/packages/gatsby-transformer-excel/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-excel#readme", diff --git a/packages/gatsby-transformer-hjson/.babelrc b/packages/gatsby-transformer-hjson/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-hjson/.babelrc +++ b/packages/gatsby-transformer-hjson/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-hjson/package.json b/packages/gatsby-transformer-hjson/package.json index cb29e478beaaf..7f64c8c20dcdc 100644 --- a/packages/gatsby-transformer-hjson/package.json +++ b/packages/gatsby-transformer-hjson/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-hjson#readme", diff --git a/packages/gatsby-transformer-javascript-frontmatter/.babelrc b/packages/gatsby-transformer-javascript-frontmatter/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-javascript-frontmatter/.babelrc +++ b/packages/gatsby-transformer-javascript-frontmatter/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-javascript-frontmatter/package.json b/packages/gatsby-transformer-javascript-frontmatter/package.json index 6e1e922a50dc8..5fd523efc467d 100644 --- a/packages/gatsby-transformer-javascript-frontmatter/package.json +++ b/packages/gatsby-transformer-javascript-frontmatter/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "keywords": [ diff --git a/packages/gatsby-transformer-javascript-static-exports/.babelrc b/packages/gatsby-transformer-javascript-static-exports/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-javascript-static-exports/.babelrc +++ b/packages/gatsby-transformer-javascript-static-exports/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-javascript-static-exports/package.json b/packages/gatsby-transformer-javascript-static-exports/package.json index 9bb79345eed52..307d222f0c5d9 100644 --- a/packages/gatsby-transformer-javascript-static-exports/package.json +++ b/packages/gatsby-transformer-javascript-static-exports/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-javascript-static-exports#readme", diff --git a/packages/gatsby-transformer-json/.babelrc b/packages/gatsby-transformer-json/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-json/.babelrc +++ b/packages/gatsby-transformer-json/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-json/package.json b/packages/gatsby-transformer-json/package.json index ec86f5622b771..cc14f4bf6e4c2 100644 --- a/packages/gatsby-transformer-json/package.json +++ b/packages/gatsby-transformer-json/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-json#readme", diff --git a/packages/gatsby-transformer-pdf/.babelrc b/packages/gatsby-transformer-pdf/.babelrc index 15dc943f1df57..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-pdf/.babelrc +++ b/packages/gatsby-transformer-pdf/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] -} \ No newline at end of file +} diff --git a/packages/gatsby-transformer-pdf/package.json b/packages/gatsby-transformer-pdf/package.json index 3cece26b792cd..64675c9c24954 100644 --- a/packages/gatsby-transformer-pdf/package.json +++ b/packages/gatsby-transformer-pdf/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-pdf#readme", diff --git a/packages/gatsby-transformer-react-docgen/.babelrc b/packages/gatsby-transformer-react-docgen/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-react-docgen/.babelrc +++ b/packages/gatsby-transformer-react-docgen/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-react-docgen/package.json b/packages/gatsby-transformer-react-docgen/package.json index 94fa68067e46d..5518ec6ed7dba 100644 --- a/packages/gatsby-transformer-react-docgen/package.json +++ b/packages/gatsby-transformer-react-docgen/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "lodash": "^4.17.10" }, diff --git a/packages/gatsby-transformer-remark/.babelrc b/packages/gatsby-transformer-remark/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-remark/.babelrc +++ b/packages/gatsby-transformer-remark/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-remark/package.json b/packages/gatsby-transformer-remark/package.json index a43a3d1ddd7d7..54f160e10881a 100644 --- a/packages/gatsby-transformer-remark/package.json +++ b/packages/gatsby-transformer-remark/package.json @@ -30,6 +30,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-remark#readme", diff --git a/packages/gatsby-transformer-screenshot/.babelrc b/packages/gatsby-transformer-screenshot/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-screenshot/.babelrc +++ b/packages/gatsby-transformer-screenshot/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-screenshot/package.json b/packages/gatsby-transformer-screenshot/package.json index ad227ec01110e..d814ca106ce52 100644 --- a/packages/gatsby-transformer-screenshot/package.json +++ b/packages/gatsby-transformer-screenshot/package.json @@ -13,6 +13,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-screenshot#readme", diff --git a/packages/gatsby-transformer-sharp/.babelrc b/packages/gatsby-transformer-sharp/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-sharp/.babelrc +++ b/packages/gatsby-transformer-sharp/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-sharp/package.json b/packages/gatsby-transformer-sharp/package.json index bdbe4558d5d90..952becfd497ab 100644 --- a/packages/gatsby-transformer-sharp/package.json +++ b/packages/gatsby-transformer-sharp/package.json @@ -17,6 +17,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-sharp#readme", diff --git a/packages/gatsby-transformer-sqip/.babelrc b/packages/gatsby-transformer-sqip/.babelrc index 61247365a9c31..aaa36072d7588 100644 --- a/packages/gatsby-transformer-sqip/.babelrc +++ b/packages/gatsby-transformer-sqip/.babelrc @@ -1,6 +1,6 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/packages/gatsby-transformer-sqip/package.json b/packages/gatsby-transformer-sqip/package.json index 8cd771b4e7aed..0d7eec91e258c 100644 --- a/packages/gatsby-transformer-sqip/package.json +++ b/packages/gatsby-transformer-sqip/package.json @@ -18,6 +18,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.0.5", "debug": "^3.1.0" }, diff --git a/packages/gatsby-transformer-toml/.babelrc b/packages/gatsby-transformer-toml/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-toml/.babelrc +++ b/packages/gatsby-transformer-toml/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-toml/package.json b/packages/gatsby-transformer-toml/package.json index b72207da6f7b2..6527b300d7587 100644 --- a/packages/gatsby-transformer-toml/package.json +++ b/packages/gatsby-transformer-toml/package.json @@ -14,6 +14,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-toml#readme", diff --git a/packages/gatsby-transformer-xml/.babelrc b/packages/gatsby-transformer-xml/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-xml/.babelrc +++ b/packages/gatsby-transformer-xml/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-xml/package.json b/packages/gatsby-transformer-xml/package.json index 446565e584bde..f5ab84d469162 100644 --- a/packages/gatsby-transformer-xml/package.json +++ b/packages/gatsby-transformer-xml/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-xml#readme", diff --git a/packages/gatsby-transformer-yaml/.babelrc b/packages/gatsby-transformer-yaml/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/gatsby-transformer-yaml/.babelrc +++ b/packages/gatsby-transformer-yaml/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/gatsby-transformer-yaml/package.json b/packages/gatsby-transformer-yaml/package.json index 0af69332bffa8..f575fcd18f2d6 100644 --- a/packages/gatsby-transformer-yaml/package.json +++ b/packages/gatsby-transformer-yaml/package.json @@ -15,6 +15,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4" }, "homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-yaml#readme", diff --git a/packages/gatsby/package.json b/packages/gatsby/package.json index bacc5354d3026..9b7a6c6684f53 100644 --- a/packages/gatsby/package.json +++ b/packages/gatsby/package.json @@ -13,12 +13,7 @@ "@babel/code-frame": "^7.0.0", "@babel/core": "^7.0.0", "@babel/parser": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-syntax-dynamic-import": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", "@babel/polyfill": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/preset-react": "^7.0.0", "@babel/runtime": "^7.0.0", "@babel/traverse": "^7.0.0", "@reach/router": "^1.1.1", @@ -28,8 +23,8 @@ "babel-loader": "8.0.0-beta.4", "babel-plugin-add-module-exports": "^0.2.1", "babel-plugin-dynamic-import-node": "^1.2.0", - "babel-plugin-macros": "^2.4.0", "babel-plugin-remove-graphql-queries": "^2.0.2-rc.3", + "babel-preset-gatsby": "^0.1.1", "better-queue": "^3.8.6", "bluebird": "^3.5.0", "cache-manager": "^2.9.0", @@ -129,12 +124,8 @@ }, "devDependencies": { "@babel/cli": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/preset-flow": "^7.0.0", - "@babel/preset-react": "^7.0.0", "@babel/runtime": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "lerna": "^2.9.0", "nyc": "^7.0.0", diff --git a/packages/gatsby/src/redux/__tests__/__snapshots__/babelrc.js.snap b/packages/gatsby/src/redux/__tests__/__snapshots__/babelrc.js.snap index 689ce4a6375c2..b5e94554957f9 100644 --- a/packages/gatsby/src/redux/__tests__/__snapshots__/babelrc.js.snap +++ b/packages/gatsby/src/redux/__tests__/__snapshots__/babelrc.js.snap @@ -167,71 +167,11 @@ Array [ ], Array [ Array [ - "/path/to/module/@babel/preset-env", - Object { - "loose": true, - "modules": false, - "targets": Object { - "browsers": undefined, - }, - "useBuiltIns": "usage", - }, - ], - Object { - "type": "preset", - }, - ], - Array [ - Array [ - "/path/to/module/@babel/preset-react", - Object { - "development": false, - "pragma": "React.createElement", - "useBuiltIns": true, - }, + "/path/to/module/babel-preset-gatsby", ], Object { "type": "preset", }, ], - Array [ - Array [ - "/path/to/module/@babel/plugin-proposal-class-properties", - Object { - "loose": true, - }, - ], - Object { - "type": "plugin", - }, - ], - Array [ - Array [ - "/path/to/module/babel-plugin-macros", - ], - Object { - "type": "plugin", - }, - ], - Array [ - Array [ - "/path/to/module/@babel/plugin-syntax-dynamic-import", - ], - Object { - "type": "plugin", - }, - ], - Array [ - Array [ - "/path/to/module/@babel/plugin-transform-runtime", - Object { - "helpers": true, - "regenerator": true, - }, - ], - Object { - "type": "plugin", - }, - ], ] `; diff --git a/packages/gatsby/src/utils/babel-loader-helpers.js b/packages/gatsby/src/utils/babel-loader-helpers.js index 1559136fcbf3b..4ce5b6b3c98c3 100644 --- a/packages/gatsby/src/utils/babel-loader-helpers.js +++ b/packages/gatsby/src/utils/babel-loader-helpers.js @@ -48,95 +48,14 @@ const prepareOptions = (babel, resolve = require.resolve) => { ) } - // Fallback presets/plugins + // Fallback preset const fallbackPresets = [] - const fallbackPlugins = [] - - let targets - if (stage === `build-html`) { - targets = { - node: `current`, - } - } else { - targets = { - browsers: pluginBabelConfig.browserslist, - } - } fallbackPresets.push( - babel.createConfigItem( - [ - resolve(`@babel/preset-env`), - { - loose: true, - modules: false, - useBuiltIns: `usage`, - targets, - }, - ], - { - type: `preset`, - } - ) - ) - - fallbackPresets.push( - babel.createConfigItem( - [ - resolve(`@babel/preset-react`), - { - useBuiltIns: true, - pragma: `React.createElement`, - development: stage === `develop`, - }, - ], - { - type: `preset`, - } - ) - ) - - fallbackPlugins.push( - babel.createConfigItem( - [ - resolve(`@babel/plugin-proposal-class-properties`), - { - loose: true, - }, - ], - { - type: `plugin`, - } - ) - ) - - fallbackPlugins.push( - babel.createConfigItem([resolve(`babel-plugin-macros`)], { - type: `plugin`, + babel.createConfigItem([resolve(`babel-preset-gatsby`)], { + type: `preset`, }) ) - - fallbackPlugins.push( - babel.createConfigItem([resolve(`@babel/plugin-syntax-dynamic-import`)], { - type: `plugin`, - }) - ) - - fallbackPlugins.push( - babel.createConfigItem( - [ - resolve(`@babel/plugin-transform-runtime`), - { - helpers: true, - regenerator: true, - }, - ], - { - type: `plugin`, - } - ) - ) - // Go through babel state and create config items for presets/plugins from. const reduxPlugins = [] const reduxPresets = [] @@ -160,7 +79,6 @@ const prepareOptions = (babel, resolve = require.resolve) => { reduxPlugins, requiredPresets, requiredPlugins, - fallbackPlugins, fallbackPresets, ] } diff --git a/packages/gatsby/src/utils/babel-loader.js b/packages/gatsby/src/utils/babel-loader.js index d88c26f313545..b3a646363cd0a 100644 --- a/packages/gatsby/src/utils/babel-loader.js +++ b/packages/gatsby/src/utils/babel-loader.js @@ -43,7 +43,6 @@ module.exports = babelLoader.custom(babel => { reduxPlugins, requiredPresets, requiredPlugins, - fallbackPlugins, fallbackPresets, ] = prepareOptions(babel) @@ -52,7 +51,7 @@ module.exports = babelLoader.custom(babel => { if (!partialConfig.hasFilesystemConfig()) { options = { ...options, - plugins: [...fallbackPlugins, ...requiredPlugins], + plugins: requiredPlugins, presets: [...fallbackPresets, ...requiredPresets], } } else { diff --git a/packages/graphql-skip-limit/.babelrc b/packages/graphql-skip-limit/.babelrc index b5d6b28d4b5ea..9f5de61e0d79e 100644 --- a/packages/graphql-skip-limit/.babelrc +++ b/packages/graphql-skip-limit/.babelrc @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js"] + ["babel-preset-gatsby-package"] ] } diff --git a/packages/graphql-skip-limit/package.json b/packages/graphql-skip-limit/package.json index 8e5b2df640e8c..5bf6a535a31ce 100644 --- a/packages/graphql-skip-limit/package.json +++ b/packages/graphql-skip-limit/package.json @@ -12,6 +12,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.1.4", "graphql": "^0.13.2" }, diff --git a/plop-templates/package/.babelrc.hbs b/plop-templates/package/.babelrc.hbs index 49f11f3ac4077..c5aaeee07bfaf 100644 --- a/plop-templates/package/.babelrc.hbs +++ b/plop-templates/package/.babelrc.hbs @@ -1,5 +1,5 @@ { "presets": [ - ["../../.babel-preset.js", { "browser": true }] + ["babel-preset-gatsby-package", { "browser": true }] ] } diff --git a/plop-templates/package/package.json.hbs b/plop-templates/package/package.json.hbs index ccf4fd2cc4409..e9e0b6cea6841 100644 --- a/plop-templates/package/package.json.hbs +++ b/plop-templates/package/package.json.hbs @@ -27,6 +27,7 @@ "devDependencies": { "@babel/cli": "^7.0.0", "@babel/core": "^7.0.0", + "babel-preset-gatsby-package": "^0.1.1", "cross-env": "^5.0.5" } } diff --git a/yarn.lock b/yarn.lock index 75c9464ba602d..51c83ad2e9774 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2928,12 +2928,13 @@ babel-plugin-lodash@^3.2.11: lodash "^4.17.10" require-package-name "^2.0.1" -babel-plugin-macros@^2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.0.tgz#6c5f9836e1f6c0a9743b3bab4af29f73e437e544" - integrity sha512-flIBfrqAdHWn+4l2cS/4jZEyl+m5EaBHVzTb0aOF+eu/zR7E41/MoCFHPhDNL8Wzq1nyelnXeT+vcL2byFLSZw== +babel-plugin-macros@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.2.tgz#21b1a2e82e2130403c5ff785cba6548e9b644b28" + integrity sha512-NBVpEWN4OQ/bHnu1fyDaAaTPAjnhXCEPqr1RwqxrU7b6tZ2hypp+zX4hlNfmVGfClD5c3Sl6Hfj5TJNF5VG5aA== dependencies: cosmiconfig "^5.0.5" + resolve "^1.8.1" babel-plugin-macros@^2.4.2: version "2.4.2"