Skip to content

Commit

Permalink
Fixes #28270 - consume babel from 3rd-party
Browse files Browse the repository at this point in the history
- Consume prod babel from @theforeman/builder/babel
- Consume dev  babel from @theforeman/env/babel
  • Loading branch information
sharvit committed Dec 1, 2019
1 parent 7b25593 commit bec5ad8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 42 deletions.
18 changes: 0 additions & 18 deletions .babelrc

This file was deleted.

3 changes: 3 additions & 0 deletions .babelrc.js
@@ -0,0 +1,3 @@
module.exports = {
presets: ['@theforeman/builder/babel'],
};
13 changes: 2 additions & 11 deletions config/webpack.config.js
Expand Up @@ -134,17 +134,8 @@ module.exports = env => {
exclude: /node_modules(?!\/(@novnc|unidiff))/,
loader: 'babel-loader',
options: {
'presets': [
path.join(__dirname, '..', 'node_modules/@babel/preset-react'),
path.join(__dirname, '..', 'node_modules/@babel/preset-env')
],
'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')
]
}
presets: [require.resolve('@theforeman/builder/babel')]
},
},
{
test: /\.css$/,
Expand Down
17 changes: 5 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.3.1",
"intl": "~1.2.5",
"jed": "^1.1.1",
"react-intl": "^2.8.0"
Expand All @@ -29,27 +29,20 @@
"chromedriver": "77.0.0"
},
"devDependencies": {
"@babel/core": "^7.7.0",
"@storybook/addon-actions": "~3.4.12",
"@storybook/addon-knobs": "~3.4.12",
"@storybook/addon-storysource": "^3.4.12",
"@storybook/react": "~3.4.12",
"@storybook/storybook-deployer": "^2.0.0",
"@theforeman/vendor-dev": "^3.0.0",
"@theforeman/builder": "^3.3.1",
"@theforeman/env": "^3.3.1",
"@theforeman/vendor-dev": "^3.3.1",
"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 bec5ad8

Please sign in to comment.