Skip to content

Commit

Permalink
refactor: JSON.stringify replacer can not be boolean (#2276)
Browse files Browse the repository at this point in the history
  • Loading branch information
clarkdo authored and devongovett committed Nov 14, 2018
1 parent 3bc7062 commit badc3ab
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/core/parcel-bundler/src/assets/CSSAsset.js
Expand Up @@ -122,7 +122,7 @@ class CSSAsset extends Asset {

if (this.cssModules) {
js +=
'module.exports = ' + JSON.stringify(this.cssModules, false, 2) + ';';
'module.exports = ' + JSON.stringify(this.cssModules, null, 2) + ';';
}

return [
Expand Down
2 changes: 1 addition & 1 deletion packages/core/parcel-bundler/src/assets/GraphqlAsset.js
Expand Up @@ -60,7 +60,7 @@ class GraphqlAsset extends Asset {
}

generate() {
return `module.exports=${JSON.stringify(this.ast, false, 2)};`;
return `module.exports=${JSON.stringify(this.ast, null, 2)};`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/parcel-bundler/src/assets/VueAsset.js
Expand Up @@ -100,7 +100,7 @@ class VueAsset extends Asset {
supplemental += this.compileCSSModules(generated, optsVar);
supplemental += this.compileHMR(generated, optsVar);

if (this.options.minify && !this.options.scopeHoist && supplemental) {
if (this.options.minify && !this.options.scopeHoist) {
let {code, error} = minify(supplemental, {toplevel: true});
if (error) {
throw error;
Expand Down

0 comments on commit badc3ab

Please sign in to comment.