Skip to content

Commit

Permalink
Fixes #28270 - consume @theforeman/babel
Browse files Browse the repository at this point in the history
  • Loading branch information
sharvit committed Nov 21, 2019
1 parent 24d0c96 commit 1062f27
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 43 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: [require.resolve('@theforeman/babel')],
};
14 changes: 2 additions & 12 deletions config/webpack.config.js
@@ -1,6 +1,7 @@
/* eslint-disable no-var*/
'use strict';

var babelOptions = require('../.babelrc.js');
var path = require('path');
var webpack = require('webpack');
var ForemanVendorPlugin = require('@theforeman/vendor').WebpackForemanVendorPlugin;
Expand Down Expand Up @@ -133,18 +134,7 @@ module.exports = env => {
unidiff can be removed once https://github.com/mvoss9000/unidiff/pull/1 is merged */
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')
]
}
options: babelOptions,
},
{
test: /\.css$/,
Expand Down
16 changes: 4 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.2.0",
"intl": "~1.2.5",
"jed": "^1.1.1",
"react-intl": "^2.8.0"
Expand All @@ -34,22 +34,14 @@
"@storybook/addon-storysource": "^3.4.12",
"@storybook/react": "~3.4.12",
"@storybook/storybook-deployer": "^2.0.0",
"@theforeman/vendor-dev": "^3.0.0",
"@theforeman/babel": "^3.2.0",
"@theforeman/env": "^3.2.0",
"@theforeman/vendor-dev": "^3.2.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 1062f27

Please sign in to comment.