Answer the question
In order to leave comments, you need to log in
Gulp babel how to specify umd/amd module name?
Good day, in general, I ran into a problem with the names of modules, or rather their absence. Previously, webpack was used and there were no problems with this, but it was necessary to change the collector to Gulp. With Gulp I use the `gulp-babel` plugin for es6 → es2015 but there is a problem babel generates unnamed modules:
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.i18n = mod.exports;
}
})(this, function (exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (key) {
return chrome.i18n.getMessage(key);
};
});
define(["exports"], factory);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question