From 063ad2334ec166408ae345a9155c30f2d3c5db64 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 22 Nov 2019 17:05:22 +0800 Subject: [PATCH] test: fix babel-preset-gatsby error in travisci --- .travis.yml | 19 +++++++++---------- babel.config.js | 2 ++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 01859d3e6e..7807ea6d3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,14 @@ -sudo: false language: node_js + node_js: -- '12' + - '12' + env: - matrix: - - TEST_TYPE=ci - - NODE_ENV=test -branches: - only: - - master + - NODE_ENV=test + install: -- yarn install + - yarn install + script: -- yarn run lint + - yarn lint + - yarn test diff --git a/babel.config.js b/babel.config.js index 9cd7ba068b..ca6abef2c6 100644 --- a/babel.config.js +++ b/babel.config.js @@ -5,6 +5,7 @@ module.exports = api => { const isCommonJS = api.env('cjs'); const isESModule = api.env('esm'); const isTest = api.env('test'); + if (process.env.GATSBY === 'true') { // return { presets: [ @@ -33,6 +34,7 @@ module.exports = api => { ] }; } + return { presets: [ [