Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@ItsJonQ I think I've narrowed down the problem to two different issues - both of which occur in their own way on IE11.
Problem 1
When running the project locally the following errors are being thrown in the console
![screen shot 2019-01-12 at 11 50 44 pm](https://user-images.githubusercontent.com/7111256/51083529-9cbab080-16d0-11e9-8f04-fb863c292731.png)
Background
Create React App(CRA) does not allow for overriding config files like
babel.rc
. So if the user runsnpm run start
which callsreact-scripts start
, CRA doesn't read the local Babel file and the@helpscout/zero/babel
preset is not being consumed.How to reproduce
npm run start
Promise is undefined
errors are also being thrownHow to fix
'react-app-polyfill/ie11’
and require at the top ofindex.js
filebe updated. But this seems to be what the
kcd-scripts
dependency (mentioned below) is helping to alleviate the need for. So the first suggested fix seems like the best option. )Problem 2
When running a build of Beacon DevTools the built files are not being compiled correctly for required browsers - i.e. IE11.
Background
One of the Beacon DevTools' dependencies,
Zero
, inherited a requirement (or quirk 😉) from its inspirationkcd-scripts
(also a dependency ofZero
). Inside ofzero/src/config/babelrc.js
this line https://github.com/helpscout/zero/blob/master/src/config/babelrc.js#L38 is loading the declared browserslist from Beacon DevTools'package.json
:The problem (quirk) is occurring on this line: https://github.com/helpscout/zero/blob/master/src/config/babelrc.js#L43. For the
browsersConfig
to be consumed it is required that one of two environment variables are set at runtime: EitherBUILD_WEBPACK
orBUILD_ROLLUP
. Because this is not currently occurring, the build target isnode
which is not compiling correctly to support required browsers.How to reproduce
How to reproduction:
npm run build
dist/actions/index.js
How to fix
BUILD_WEBPACK=true zero build