Skip to content

Babel upgrade#594

Merged
Gaurav0 merged 7 commits intoember-cli:masterfrom
Gaurav0:babel_upgrade
Apr 6, 2018
Merged

Babel upgrade#594
Gaurav0 merged 7 commits intoember-cli:masterfrom
Gaurav0:babel_upgrade

Conversation

@Gaurav0
Copy link
Copy Markdown
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 a team and rwjblue April 6, 2018 00:27
Comment thread package.json Outdated
"devDependencies": {
"broccoli-asset-rev": "^2.4.5",
"broccoli-babel-transpiler": "~5.6.1",
"broccoli-babel-transpiler": "~5.6.2",
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed now.

Comment thread app/services/ember-cli.js Outdated
depScriptTags += `
<script type="text/javascript">
Object.keys(requirejs.entries).forEach(function (moduleName) {
require(moduleName).__esModule = true;
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread app/services/ember-cli.js Outdated
plugins: [
['transform-es2015-modules-amd', {
loose: true,
noInterop: false
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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