Skip to content

Commit

Permalink
fix mangle.json always being generated
Browse files Browse the repository at this point in the history
  • Loading branch information
developit committed Mar 4, 2019
1 parent 69b5165 commit cf00d7d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ function createConfig(options, entry, format, writeMeta) {
// let rollupName = safeVariableName(basename(entry).replace(/\.js$/, ''));

let nameCache = {};
const bareNameCache = nameCache;
// Support "minify" field and legacy "mangle" field via package.json:
let minifyOptions = options.pkg.minify || options.pkg.mangle || {};

Expand Down Expand Up @@ -440,6 +441,8 @@ function createConfig(options, entry, format, writeMeta) {

normalizeMinifyOptions(minifyOptions);

if (nameCache === bareNameCache) nameCache = null;

let shebang;

let config = {
Expand Down

0 comments on commit cf00d7d

Please sign in to comment.