Preserve minification semantics when transforming bare import specifiers (fixes #149)

This commit is contained in:
Jason Miller
2019-03-20 14:55:32 -07:00
committed by Michael Jackson
parent da7b915cca
commit ab78e4f64e
@@ -16,6 +16,10 @@ export default function rewriteBareModuleIdentifiers(code, packageConfig) {
// because we haven't installed dependencies so
// we can't load plugins; see #84
babelrc: false,
// Make a reasonable attempt to preserve whitespace
// from the original file. This ensures minified
// .mjs stays minified; see #149
retainLines: true,
plugins: [unpkgRewrite(origin, dependencies)]
};