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

This commit is contained in:
Jason Miller 2019-03-06 11:09:29 -05:00 committed by Michael Jackson
parent da7b915cca
commit ab78e4f64e
1 changed files with 4 additions and 0 deletions

View File

@ -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)]
};