Skip to content

Commit

Permalink
Fixes #28270 - consume babel from @theforeman/env
Browse files Browse the repository at this point in the history
  • Loading branch information
sharvit committed Nov 17, 2019
1 parent 24d0c96 commit 7a7f4e4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 37 deletions.
17 changes: 1 addition & 16 deletions .babelrc
@@ -1,18 +1,3 @@
{
"presets": ["@babel/preset-env", "@babel/preset-react"],
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-transform-object-assign",
"@babel/plugin-syntax-dynamic-import"
],
"env": {
"test": {
"presets": ["@theforeman/vendor-dev/babel.preset.js"],
"plugins": ["dynamic-import-node"]
},
"storybook": {
"presets": ["@theforeman/vendor-dev/babel.preset.js"]
}
}
"presets": ["@theforeman/env/babel"]
}
9 changes: 1 addition & 8 deletions config/webpack.config.js
Expand Up @@ -135,15 +135,8 @@ module.exports = env => {
loader: 'babel-loader',
options: {
'presets': [
path.join(__dirname, '..', 'node_modules/@babel/preset-react'),
path.join(__dirname, '..', 'node_modules/@babel/preset-env')
require.resolve('@theforeman/env/babel'),
],
'plugins': [
path.join(__dirname, '..', 'node_modules/@babel/plugin-proposal-class-properties'),
path.join(__dirname, '..', 'node_modules/@babel/plugin-proposal-object-rest-spread'),
path.join(__dirname, '..', 'node_modules/@babel/plugin-transform-object-assign'),
path.join(__dirname, '..', 'node_modules/@babel/plugin-syntax-dynamic-import')
]
}
},
{
Expand Down
15 changes: 3 additions & 12 deletions package.json
Expand Up @@ -20,7 +20,7 @@
"create-react-component": "yo react-domain"
},
"dependencies": {
"@theforeman/vendor": "^3.0.0",
"@theforeman/vendor": "^3.1.0",
"intl": "~1.2.5",
"jed": "^1.1.1",
"react-intl": "^2.8.0"
Expand All @@ -34,22 +34,13 @@
"@storybook/addon-storysource": "^3.4.12",
"@storybook/react": "~3.4.12",
"@storybook/storybook-deployer": "^2.0.0",
"@theforeman/vendor-dev": "^3.0.0",
"@theforeman/env": "^3.1.0",
"@theforeman/vendor-dev": "^3.1.0",
"argv-parse": "^1.0.1",
"axios-mock-adapter": "^1.10.0",
"@babel/cli": "^7.7.0",
"@babel/core": "^7.7.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/plugin-proposal-class-properties": "^7.7.0",
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
"@babel/plugin-transform-object-assign": "^7.2.0",
"@babel/preset-env": "^7.7.0",
"@babel/preset-react": "^7.7.0",
"@babel/register": "^7.7.0",
"babel-eslint": "^10.0.0",
"babel-jest": "^24.9.0",
"babel-loader": "^8.0.0",
"babel-plugin-dynamic-import-node": "^2.0.0",
"compression-webpack-plugin": "~1.1.11",
"coveralls": "^3.0.0",
"cross-env": "^5.2.0",
Expand Down
1 change: 0 additions & 1 deletion webpack/stories/index.js
@@ -1,6 +1,5 @@
import 'core-js/shim';
import 'regenerator-runtime/runtime';

import React from 'react';
import { configure, storiesOf } from '@storybook/react';
import Markdown from './components/Markdown';
Expand Down

0 comments on commit 7a7f4e4

Please sign in to comment.