diff --git a/lib/6to5/transformation/modules/_default.js b/lib/6to5/transformation/modules/_default.js index 300c12ab18..1bc78c15ab 100644 --- a/lib/6to5/transformation/modules/_default.js +++ b/lib/6to5/transformation/modules/_default.js @@ -171,7 +171,7 @@ DefaultFormatter.prototype.getModuleName = function () { if (!opts.keepModuleIdExtensions) { // remove extension - filenameRelative = filenameRelative.replace(/\.(.*?)$/, ""); + filenameRelative = filenameRelative.replace(/\.(\w*?)$/, ""); } moduleName += filenameRelative;