Skip to content

Commit

Permalink
WIP Add changelog entry with upgrade guide. (#2107)
Browse files Browse the repository at this point in the history
Taking @connorshea's suggestion from #2031 (comment) to warn users who were using `@babel/polyfill`
  • Loading branch information
jakeNiemiec authored and gauravtiwari committed May 28, 2019
1 parent 9bb8abb commit 80f3b55
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@

Please see the diff

### Breaking changes

- [`@babel/polyfill`](https://babeljs.io/docs/en/next/babel-polyfill.html) [doesn't make it possible to provide a smooth migration path from `core-js@2` to `core-js@3`](https://github.com/zloirock/core-js/blob/master/docs/2019-03-19-core-js-3-babel-and-a-look-into-the-future.md#babelpolyfill): for this reason, it was decided to deprecate `@babel/polyfill` in favor of separate inclusion of required parts of `core-js` and `regenerator-runtime`. [#2031](https://github.com/rails/webpacker/pull/2031)

In each of your `/packs/*.js` files, change this:
```js
import "@babel/polyfill";
```
to this:
```js
import "core-js/stable";
import "regenerator-runtime/runtime";
```

Don't forget install those dependencies directly!

This comment has been minimized.

Copy link
@connorshea

connorshea May 29, 2019

Contributor

Is there a reason to do this given that they’re dependencies of webpacker?

This comment has been minimized.

Copy link
@jakeNiemiec

jakeNiemiec May 29, 2019

Author Member

There are rare but nasty edge cases with package resolution, nodejs packages have some weird quirks compared to gems. Here is a good example of such: #2077 (comment)

Think of the JS concept of hoisting, this is why libraries such as @rails/webpacker.

But never mind all of that because these things are changing with both:


```sh
yarn add --save core-js regenerator-runtime
```

## [4.0.2] - 2019-03-06

- Bump the version on npm
Expand Down

0 comments on commit 80f3b55

Please sign in to comment.