Skip to content

es6 modules - unwrap amd modules#6082

Closed
spalger wants to merge 1 commit intoelastic:masterfrom
spalger:implement/es6Modules/unwrapDefine
Closed

es6 modules - unwrap amd modules#6082
spalger wants to merge 1 commit intoelastic:masterfrom
spalger:implement/es6Modules/unwrapDefine

Conversation

@spalger
Copy link
Contributor

@spalger spalger commented Feb 3, 2016

amd modules are not compatible with import statements, this transforms:

define(function (require) {
  var _ = require('lodash');
  return function () {
    //...
  };
});

into:

export default function () {
  var _ = require('lodash');
  //...
};

@spalger spalger changed the title [es6modules] unwrap amd modules, hoist imports es6 modules - unwrap amd modules Feb 3, 2016
@spalger spalger force-pushed the implement/es6Modules/unwrapDefine branch from 61cb266 to f791e8f Compare February 3, 2016 16:17
@spalger spalger force-pushed the implement/es6Modules/unwrapDefine branch from f791e8f to 5fe5ea9 Compare February 3, 2016 17:31
@spalger
Copy link
Contributor Author

spalger commented Feb 3, 2016

We need to do this last, since the load order of modules using amd is important this depends on all other changes first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants