Skip to content

Commit fedfd79

Browse files
author
David Zukowski
committed
feat(babel-polyfill): enable polyfill by default
1 parent 3ff10fb commit fedfd79

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

build/karma.conf.js

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ debug('Create configuration.')
99
const karmaConfig = {
1010
basePath: '../', // project root in relation to bin/karma.js
1111
files: [
12-
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
1312
{
1413
pattern: `./${config.dir_test}/test-bundler.js`,
1514
watched: false,

build/webpack.config.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,15 @@ const webpackConfig = {
2323
// ------------------------------------
2424
// Entry Points
2525
// ------------------------------------
26-
const APP_ENTRY_PATH = paths.client('main.js')
26+
const APP_ENTRY_PATHS = [
27+
'babel-polyfill',
28+
paths.client('main.js')
29+
]
2730

2831
webpackConfig.entry = {
2932
app: __DEV__
30-
? [APP_ENTRY_PATH, `webpack-hot-middleware/client?path=${config.compiler_public_path}__webpack_hmr`]
31-
: [APP_ENTRY_PATH],
33+
? APP_ENTRY_PATHS.concat(`webpack-hot-middleware/client?path=${config.compiler_public_path}__webpack_hmr`)
34+
: APP_ENTRY_PATHS,
3235
vendor: config.compiler_vendor
3336
}
3437

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"babel-core": "^6.3.17",
8282
"babel-loader": "^6.2.0",
8383
"babel-plugin-transform-runtime": "^6.3.13",
84+
"babel-polyfill": "^6.9.0",
8485
"babel-preset-es2015": "^6.3.13",
8586
"babel-preset-react": "^6.3.13",
8687
"babel-preset-react-optimize": "^1.0.1",
@@ -145,7 +146,6 @@
145146
"karma-webpack-with-fast-source-maps": "^1.9.2",
146147
"mocha": "^2.2.5",
147148
"nodemon": "^1.8.1",
148-
"phantomjs-polyfill": "0.0.2",
149149
"phantomjs-prebuilt": "^2.1.3",
150150
"react-addons-test-utils": "^15.0.0",
151151
"redbox-react": "^1.2.2",

tests/test-bundler.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// ---------------------------------------
22
// Test Environment Setup
33
// ---------------------------------------
4+
import 'babel-polyfill'
45
import sinon from 'sinon'
56
import chai from 'chai'
67
import sinonChai from 'sinon-chai'

0 commit comments

Comments
 (0)