Skip to content

Commit

Permalink
Use es6-shim directly into webpack config. (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoda authored Aug 5, 2016
1 parent 7ff9f74 commit 9f402a6
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 11 deletions.
2 changes: 0 additions & 2 deletions dist/client/manager/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
'use strict';

require('es6-shim');

var _storybookUi = require('@kadira/storybook-ui');

var _storybookUi2 = _interopRequireDefault(_storybookUi);
Expand Down
2 changes: 0 additions & 2 deletions dist/client/preview/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ var _assign = require('babel-runtime/core-js/object/assign');

var _assign2 = _interopRequireDefault(_assign);

require('es6-shim');

var _story_store = require('./story_store');

var _story_store2 = _interopRequireDefault(_story_store);
Expand Down
3 changes: 3 additions & 0 deletions dist/server/config/polyfills.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
'use strict';

require('es6-shim');
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: [_path2.default.resolve(__dirname, '../../client/manager')],
preview: [_path2.default.resolve(__dirname, './error_enhancements'), 'webpack-hot-middleware/client?noInfo=true']
manager: [_path2.default.resolve(__dirname, './polyfills'), _path2.default.resolve(__dirname, '../../client/manager')],
preview: [_path2.default.resolve(__dirname, './polyfills'), _path2.default.resolve(__dirname, './error_enhancements'), '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 _paths = require('./paths');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

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

var config = {
Expand Down
1 change: 0 additions & 1 deletion src/client/manager/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'es6-shim';
import renderStorybookUI from '@kadira/storybook-ui';
import Provider from './provider';

Expand Down
1 change: 0 additions & 1 deletion src/client/preview/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'es6-shim';
import StoryStore from './story_store';
import ClientApi from './client_api';
import ConfigApi from './config_api';
Expand Down
1 change: 1 addition & 0 deletions src/server/config/polyfills.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import 'es6-shim';
2 changes: 2 additions & 0 deletions src/server/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ const config = {
devtool: '#cheap-module-eval-source-map',
entry: {
manager: [
path.resolve(__dirname, './polyfills'),
path.resolve(__dirname, '../../client/manager'),
],
preview: [
path.resolve(__dirname, './polyfills'),
path.resolve(__dirname, './error_enhancements'),
'webpack-hot-middleware/client?noInfo=true',
],
Expand Down
5 changes: 4 additions & 1 deletion src/server/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import webpack from 'webpack';
import { includePaths, excludePaths } from './paths';

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

0 comments on commit 9f402a6

Please sign in to comment.