Skip to content

Commit

Permalink
Remove extra polyfills and use polyfills from babel (#402)
Browse files Browse the repository at this point in the history
* Remove extra polyfills and use polyfills from babel

* Remove unwanted modules.
  • Loading branch information
arunoda authored Aug 24, 2016
1 parent a9cfff5 commit 8677acd
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 27 deletions.
2 changes: 0 additions & 2 deletions dist/client/preview/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ exports.renderError = renderError;
exports.renderMain = renderMain;
exports.default = renderPreview;

require('airbnb-js-shims');

var _react = require('react');

var _react2 = _interopRequireDefault(_react);
Expand Down
Empty file modified dist/server/build.js
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions dist/server/config/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ module.exports = {
require.resolve('babel-plugin-transform-regenerator'),
// Polyfills the runtime needed for async/await and generators
[require.resolve('babel-plugin-transform-runtime'), {
helpers: false,
polyfill: false,
helpers: true,
polyfill: true,
regenerator: true
}]]
};
4 changes: 2 additions & 2 deletions dist/server/config/babel.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module.exports = {
require.resolve('babel-plugin-transform-regenerator'),
// Polyfills the runtime needed for async/await and generators
[require.resolve('babel-plugin-transform-runtime'), {
helpers: false,
polyfill: false,
helpers: true,
polyfill: true,
regenerator: true
}],
// Optimization: hoist JSX that never changes out of render()
Expand Down
3 changes: 0 additions & 3 deletions dist/server/config/polyfills.js

This file was deleted.

4 changes: 2 additions & 2 deletions dist/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
var config = {
devtool: '#cheap-module-eval-source-map',
entry: {
manager: [require.resolve('./polyfills'), require.resolve('../../client/manager')],
preview: [require.resolve('./polyfills'), require.resolve('./error_enhancements'), require.resolve('webpack-hot-middleware/client') + '?noInfo=true']
manager: [require.resolve('../../client/manager')],
preview: [require.resolve('./error_enhancements'), require.resolve('webpack-hot-middleware/client') + '?noInfo=true']
},
output: {
path: _path2.default.join(__dirname, 'dist'),
Expand Down
4 changes: 2 additions & 2 deletions dist/server/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ var _utils = require('./utils');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var entries = {
preview: [_path2.default.resolve(__dirname, './polyfills')],
manager: [_path2.default.resolve(__dirname, './polyfills'), _path2.default.resolve(__dirname, '../../client/manager')]
preview: [],
manager: [_path2.default.resolve(__dirname, '../../client/manager')]
};

var config = {
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@kadira/storybook-addons": "^1.3.1",
"@kadira/storybook-channel-pagebus": "^2.0.2",
"@kadira/storybook-ui": "^3.3.1",
"airbnb-js-shims": "^1.0.0",
"autoprefixer": "^6.3.7",
"babel-core": "^6.11.4",
"babel-loader": "^6.2.4",
Expand All @@ -47,7 +46,6 @@
"commander": "^2.9.0",
"configstore": "^2.0.0",
"css-loader": "0.23.1",
"es6-shim": "^0.35.1",
"express": "^4.13.3",
"file-loader": "^0.9.0",
"json-loader": "^0.5.4",
Expand Down
1 change: 0 additions & 1 deletion src/client/preview/render.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'airbnb-js-shims';
import React from 'react';
import ReactDOM from 'react-dom';
import ErrorDisplay from './error_display';
Expand Down
4 changes: 2 additions & 2 deletions src/server/config/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ module.exports = {
require.resolve('babel-plugin-transform-regenerator'),
// Polyfills the runtime needed for async/await and generators
[require.resolve('babel-plugin-transform-runtime'), {
helpers: false,
polyfill: false,
helpers: true,
polyfill: true,
regenerator: true,
}],
],
Expand Down
4 changes: 2 additions & 2 deletions src/server/config/babel.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ module.exports = {
require.resolve('babel-plugin-transform-regenerator'),
// Polyfills the runtime needed for async/await and generators
[require.resolve('babel-plugin-transform-runtime'), {
helpers: false,
polyfill: false,
helpers: true,
polyfill: true,
regenerator: true,
}],
// Optimization: hoist JSX that never changes out of render()
Expand Down
1 change: 0 additions & 1 deletion src/server/config/polyfills.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ const config = {
devtool: '#cheap-module-eval-source-map',
entry: {
manager: [
require.resolve('./polyfills'),
require.resolve('../../client/manager'),
],
preview: [
require.resolve('./polyfills'),
require.resolve('./error_enhancements'),
`${require.resolve('webpack-hot-middleware/client')}?noInfo=true`,
],
Expand Down
5 changes: 1 addition & 4 deletions src/server/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,8 @@ import webpack from 'webpack';
import { OccurenceOrderPlugin, includePaths, excludePaths } from './utils';

const entries = {
preview: [
path.resolve(__dirname, './polyfills'),
],
preview: [],
manager: [
path.resolve(__dirname, './polyfills'),
path.resolve(__dirname, '../../client/manager'),
],
};
Expand Down

0 comments on commit 8677acd

Please sign in to comment.