Skip to content

Commit 75efae7

Browse files
committed
build: use prepack not postpack to include modified package.json
1 parent 5e0f835 commit 75efae7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
"url": "https://github.com/morganney/webpack-strip-debug-loader/issues"
1313
},
1414
"scripts": {
15-
"prepack": "babel src --out-dir dist",
16-
"postpack": "node --experimental-json-modules ./postpack.js",
15+
"prepack": "node --experimental-json-modules ./prepack.js",
1716
"lint": "eslint . src __tests__ --ext .js,.cjs",
1817
"test": "node --experimental-vm-modules ./node_modules/.bin/jest"
1918
},

postpack.js renamed to prepack.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import fs from 'fs'
2+
import { execSync } from 'child_process'
23

34
import pkg from './package.json'
45

6+
execSync('babel src --out-dir dist')
7+
58
/**
69
* Remove "type": "module" until webpack supports ES modules better
710
*/

0 commit comments

Comments
 (0)