Skip to content

Commit

Permalink
feat(babel-polyfill): enable polyfill by default
Browse files Browse the repository at this point in the history
  • Loading branch information
David Zukowski committed May 18, 2016
1 parent 3ff10fb commit fedfd79
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 0 additions & 1 deletion build/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ debug('Create configuration.')
const karmaConfig = {
basePath: '../', // project root in relation to bin/karma.js
files: [
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
{
pattern: `./${config.dir_test}/test-bundler.js`,
watched: false,
Expand Down
9 changes: 6 additions & 3 deletions build/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@ const webpackConfig = {
// ------------------------------------
// Entry Points
// ------------------------------------
const APP_ENTRY_PATH = paths.client('main.js')
const APP_ENTRY_PATHS = [
'babel-polyfill',
paths.client('main.js')
]

webpackConfig.entry = {
app: __DEV__
? [APP_ENTRY_PATH, `webpack-hot-middleware/client?path=${config.compiler_public_path}__webpack_hmr`]
: [APP_ENTRY_PATH],
? APP_ENTRY_PATHS.concat(`webpack-hot-middleware/client?path=${config.compiler_public_path}__webpack_hmr`)
: APP_ENTRY_PATHS,
vendor: config.compiler_vendor
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"babel-core": "^6.3.17",
"babel-loader": "^6.2.0",
"babel-plugin-transform-runtime": "^6.3.13",
"babel-polyfill": "^6.9.0",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-react-optimize": "^1.0.1",
Expand Down Expand Up @@ -145,7 +146,6 @@
"karma-webpack-with-fast-source-maps": "^1.9.2",
"mocha": "^2.2.5",
"nodemon": "^1.8.1",
"phantomjs-polyfill": "0.0.2",
"phantomjs-prebuilt": "^2.1.3",
"react-addons-test-utils": "^15.0.0",
"redbox-react": "^1.2.2",
Expand Down
1 change: 1 addition & 0 deletions tests/test-bundler.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// ---------------------------------------
// Test Environment Setup
// ---------------------------------------
import 'babel-polyfill'
import sinon from 'sinon'
import chai from 'chai'
import sinonChai from 'sinon-chai'
Expand Down

0 comments on commit fedfd79

Please sign in to comment.