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

Babel upgrade #594

Merged
merged 7 commits into from
Apr 6, 2018
Merged

Babel upgrade #594

merged 7 commits into from
Apr 6, 2018

Conversation

Gaurav0
Copy link
Contributor

@Gaurav0 Gaurav0 commented Apr 5, 2018

For issue #593

  • 1. Upgrade ember-twiddle to use Babel 6 for its own transpilation
  • 2. Send to client Babel 6 runtime from ember-cli-build.js
  • 3. Change how modules are compiled on client in ember-cli.js
  • 4. Get most tests working - ensure compilation is correct.
  • 5. Ensure addons still work even if compiled with Babel 5
  • 6. Fix hbs plugin
  • 7. Ensure tests still work on client (enable_testing: true).
  • 8. Fix remaining tests.

@Gaurav0 Gaurav0 requested review from rwjblue and a team April 6, 2018 00:27
package.json Outdated
@@ -18,7 +18,7 @@
"license": "MIT",
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"broccoli-babel-transpiler": "~5.6.1",
"broccoli-babel-transpiler": "~5.6.2",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is slightly odd to leave this at 5.x, but it seems totally fine to update in a follow-up...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed now.

depScriptTags += `
<script type="text/javascript">
Object.keys(requirejs.entries).forEach(function (moduleName) {
require(moduleName).__esModule = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I don't think you should need to do this...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comment explaining

plugins: [
['transform-es2015-modules-amd', {
loose: true,
noInterop: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you set this to true, I do not think that you will need the __esModule = true flag above (because Babel will not check if it has to interop).

Copy link
Contributor Author

@Gaurav0 Gaurav0 Apr 6, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed for compat with addons compiled with babel@5 using modules: 'amdStrict' Added comment explaining.

@Gaurav0 Gaurav0 merged commit c1ceb8e into ember-cli:master Apr 6, 2018
@Gaurav0 Gaurav0 deleted the babel_upgrade branch April 6, 2018 16:59
@rwjblue
Copy link
Member

rwjblue commented Apr 6, 2018

👏 👏 👏 👏

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.

2 participants