Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move meteorBabelHelpers to modules package, and restrict to legacy bundle. #10596

Merged
merged 1 commit into from Jun 25, 2019

Conversation

benjamn
Copy link
Contributor

@benjamn benjamn commented Jun 25, 2019

Should fix #10595.

Code from the application node_modules directory becomes part of the modules package, so that it can be imported by any other package that uses the module system, regardless of package load order.

Now that we compile code from node_modules using babel-compiler and meteor-babel (#10585), node_modules code requires the same runtime environment as any other Meteor JS code. For the most part, this need is satisfied by the @babel/runtime/helpers/... modules, which are also defined in the modules package because they come from node_modules. However, in the legacy bundle, meteorBabelHelpers.sanitizeForInObject is used to fix buggy for-in iteration in older Internet Explorers.

Thankfully, this extra helper code does not need to be included in the modern or server bundles, but only in legacy code.

…ndle.

Should fix #10595.

Code from the application `node_modules` directory becomes part of the
`modules` package, so that it can be imported by any other package that
uses the module system, regardless of package load order.

Now that we compile code from `node_modules` using `babel-compiler` and
`meteor-babel` (#10585), `node_modules` code requires the same runtime
environment as any other Meteor JS code. For the most part, this need is
satisfied by the `@babel/runtime/helpers/...` modules, which are also
defined in the `modules` package because they come from `node_modules`.
However, in the legacy bundle, `meteorBabelHelpers.sanitizeForInObject` is
used to fix buggy for-in iteration in older Internet Explorers.

Thankfully, this extra helper code does not need to be included in the
modern or server bundles, but only in legacy code.
@benjamn benjamn added this to the Release 1.8.2 milestone Jun 25, 2019
@benjamn benjamn self-assigned this Jun 25, 2019
@benjamn
Copy link
Contributor Author

benjamn commented Jun 25, 2019

By the way, I submitted this as a PR rather than just pushing to release-1.8.2 because running tests in PhantomJS is a great way to verify any functionality specific to the legacy bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant