Skip to content

Instantly share code, notes, and snippets.

@tricknotes
Last active February 12, 2024 00:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tricknotes/97d21fba1d508c27bec9 to your computer and use it in GitHub Desktop.
Save tricknotes/97d21fba1d508c27bec9 to your computer and use it in GitHub Desktop.
$ 6to5 source.js -m amd
// 6to5 source.js -m umd
(function (factory) {
if (typeof define === "function" && define.amd) {
define(["exports", "module"], factory);
} else if (typeof exports !== "undefined" && typeof module !== "undefined") {
factory(exports, module);
}
})(function (exports, module) {
"use strict";
module.exports = function () {
return "hi";
};
});
// 6to5 source.js -m amd
define(["exports", "module"], function (exports, module) {
"use strict";
module.exports = function () {
return "hi";
};
});
export default function() {
return 'hi';
};
@tricknotes
Copy link
Author

$ 6to5 --version
3.3.12
$ 6to5 source.js -m amd > dest.js

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