Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

24 changes: 24 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* Copyright Zendesk, Inc.
*
* Use of this source code is governed under the Apache License, Version 2.0
* found at http://www.apache.org/licenses/LICENSE-2.0.
*/

module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: '> 0.5%, last 2 versions, Firefox ESR, not dead'
}
],
'@babel/preset-react'
],
plugins: [
'@babel/plugin-transform-object-assign',
'@babel/plugin-proposal-class-properties',
'babel-plugin-inline-react-svg',
'babel-plugin-styled-components'
]
};
21 changes: 10 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@
"test:all": "jest --config=utils/test/jest.config.js"
},
"devDependencies": {
"@babel/cli": "7.2.0",
"@babel/core": "7.2.0",
"@babel/plugin-proposal-class-properties": "7.2.0",
"@babel/plugin-transform-object-assign": "7.2.0",
"@babel/preset-env": "7.2.0",
"@babel/preset-react": "7.0.0",
"@types/react": "16.7.12",
"@zendeskgarden/css-variables": "5.2.1",
"@zendeskgarden/eslint-config": "7.0.9",
"@zendeskgarden/stylelint-config": "9.0.9",
"@zendeskgarden/svg-icons": "5.0.0",
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"babel-loader": "7.1.5",
"babel-plugin-add-header-comment": "1.0.3",
"babel-plugin-inline-react-svg": "0.5.4",
"babel-loader": "8.0.4",
"babel-plugin-inline-react-svg": "1.0.1",
"babel-plugin-styled-components": "1.9.2",
"babel-plugin-transform-es2015-modules-commonjs": "6.26.2",
"babel-plugin-transform-object-assign": "6.22.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-0": "6.24.1",
"chalk": "2.4.1",
"commander": "2.19.0",
"core-js": "2.5.7",
"coveralls": "3.0.2",
"enhanced-resolve": "4.1.0",
"enzyme": "3.7.0",
Expand All @@ -63,7 +63,6 @@
"handlebars": "4.0.12",
"handlebars-helpers": "0.10.0",
"html-loader": "0.5.5",
"html-webpack-plugin": "3.2.0",
"husky": "1.2.0",
"identity-obj-proxy": "3.0.0",
"inquirer": "6.2.1",
Expand Down
7 changes: 2 additions & 5 deletions utils/build/webpack.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const packageManifest = require(path.resolve('package.json'));
const babelOptions = require(path.resolve('../../babel.config.js'));

const options = {
mode: 'production',
Expand Down Expand Up @@ -63,11 +64,7 @@ found at http://www.apache.org/licenses/LICENSE-2.0
use: [
{
loader: 'babel-loader',
options: {
babelrc: false,
presets: ['es2015', 'react', 'stage-0'],
plugins: ['inline-react-svg', 'transform-object-assign', 'styled-components']
}
options: babelOptions
}
]
},
Expand Down
6 changes: 4 additions & 2 deletions utils/styleguide/styleguide.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const {
} = require('@zendeskgarden/css-variables');
const packageManifest = require(path.resolve('package.json'));
const customStyleguideConfig = require(path.resolve('styleguide.config.js'));
const babelOptions = require(path.resolve('../../babel.config.js'));
const exec = require('child_process').execSync;

const COMPONENT_IDS = exec('"../../utils/scripts/get-cids.sh"', (error, stdout) => {
Expand Down Expand Up @@ -116,7 +117,7 @@ const defaultStyleguideConfig = {
objectAssign: 'Object.assign'
},
require: [
'babel-polyfill',
'core-js/shim',
path.resolve(__dirname, 'setup.js'),
path.resolve(__dirname, 'styles.css'),
'github-markdown-css'
Expand Down Expand Up @@ -144,7 +145,8 @@ const defaultStyleguideConfig = {
{
test: /\.jsx?$/u,
exclude: /node_modules/u,
loader: 'babel-loader'
loader: 'babel-loader',
options: babelOptions
},
{
test: /\.css$/u,
Expand Down
Loading