Skip to content

Commit

Permalink
Chore: Remove unused babel-polyfill (#737)
Browse files Browse the repository at this point in the history
With Node v8+ we no longer need babel-polyfill for Webpack.
  • Loading branch information
tonyjin authored Mar 28, 2018
1 parent 935a42a commit 85f6d7e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 13 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,14 @@ Development Setup
-----------------
1. Install Node v8.9.4 or higher.
2. Install yarn package manager `https://yarnpkg.com/en/docs/install`. Alternatively, you can replace any `yarn` command with `npm`.
2. Fork the upstream repo `https://github.com/box/box-content-preview`.
3. Clone your fork locally `git clone [email protected]:[YOUR GITHUB USERNAME]/box-content-preview.git`.
4. Navigate to the cloned folder `cd box-content-preview`
5. Add the upstream repo to your remotes `git remote add upstream [email protected]:box/box-content-preview.git`.
6. Verify your remotes are properly set up `git remote -v`. You should pull updates from the Box repo `upstream` and push changes to your fork `origin`.
7. Install dependencies `yarn install`
8. Test your first build! `yarn run build`
9. To automatically rsync files after a Webpack build, add a build/rsync.json file with a `location` field. This file should look like:
3. Fork the upstream repo `https://github.com/box/box-content-preview`.
4. Clone your fork locally `git clone [email protected]:[YOUR GITHUB USERNAME]/box-content-preview.git`.
5. Navigate to the cloned folder `cd box-content-preview`
6. Add the upstream repo to your remotes `git remote add upstream [email protected]:box/box-content-preview.git`.
7. Verify your remotes are properly set up `git remote -v`. You should pull updates from the Box repo `upstream` and push changes to your fork `origin`.
8. Install dependencies `yarn install`
9. Test your first build! `yarn run build`
10. To automatically rsync files after a Webpack build, add a build/rsync.json file with a `location` field. This file should look like:
```
{
"location": "YOUR_DESIRED_RSYNC_LOCATION_HERE"
Expand Down
2 changes: 1 addition & 1 deletion build/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ module.exports = (config) => config.set({
],

files: [
'https://cdn01.boxcdn.net/polyfills/core-js/2.5.3/core.min.js',
`src/third-party/model3d/${MODEL3D_STATIC_ASSETS_VERSION}/three.min.js`,
'node_modules/babel-polyfill/dist/polyfill.js',
`src/third-party/doc/${DOC_STATIC_ASSETS_VERSION}/**/*.js`,
`src/third-party/media/${MEDIA_STATIC_ASSETS_VERSION}/**/*.js`,
`src/third-party/model3d/${MODEL3D_STATIC_ASSETS_VERSION}/**/*.js`,
Expand Down
2 changes: 0 additions & 2 deletions build/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require('babel-polyfill');

const isRelease = process.env.NODE_ENV === 'production';
const isDev = process.env.NODE_ENV === 'dev';

Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"babel-plugin-transform-decorators-legacy": "^1.3.4",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-plugin-transform-require-ignore": "^0.1.1",
"babel-polyfill": "^6.23.0",
"babel-preset-es2015": "^6.24.0",
"babel-preset-es2016": "^6.24.1",
"babel-preset-react": "^6.23.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ babel-plugin-transform-strict-mode@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"

[email protected], babel-polyfill@^6.23.0:
[email protected]:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
dependencies:
Expand Down

0 comments on commit 85f6d7e

Please sign in to comment.