Skip to content

Commit 856fc48

Browse files
committed
feat(#4): pretty-print generated manifest.json
1 parent 7e19c2f commit 856fc48

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const fs = require('fs');
2-
2+
33
class ManifestVersionSyncPlugin {
44
constructor(options) {
55
const defaultOptions = {
@@ -20,7 +20,7 @@ class ManifestVersionSyncPlugin {
2020
const { packagePath, manifestPath } = this.options;
2121
const { version } = JSON.parse(fs.readFileSync(packagePath).toString());
2222
const manifest = JSON.parse(compilation.assets[manifestPath].source().toString());
23-
const content = JSON.stringify({ ...manifest, version });
23+
const content = JSON.stringify({ version, ...manifest }, undefined, 2);
2424

2525
compilation.assets[manifestPath] = {
2626
source: function() {

0 commit comments

Comments
 (0)