diff --git a/packages/app/package.json b/packages/app/package.json index a015b97c8..aa1ecd5b4 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -5,7 +5,7 @@ "scripts": { "start": "umi dev", "build": "umi build", - "postinstall": "umi generate tmp", + "postinstall": "node ./umi.cli.js generate tmp", "test": "umi-test", "test:coverage": "umi-test --coverage" }, diff --git a/packages/app/umi.cli.js b/packages/app/umi.cli.js new file mode 100644 index 000000000..d5812a8d1 --- /dev/null +++ b/packages/app/umi.cli.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node + +require('v8-compile-cache'); +require('umi/lib/cli');