1
tinyzilan123 220 天前
盲猜是类似 post install script ,包名发出来看看
|
2
coolair OP @tinyzilan123 #1 一个内部的包,package.json 信息如下:
``` { "name": "aaaaaaaaaaaaaa", "version": "0.2.1", "main": "dist/aaaaaaaaaaaaaa.min.js", "module": "dist/aaaaaaaaaaaaaa.esm.min.js", "unpkg": "dist/aaaaaaaaaaaaaa.umd.min.js", "scripts": { "start": "npm run dev", "dev": "rollup -w -c", "build": "rollup -c", "prepare": "npm run build" }, "files": [ "dist" ], "devDependencies": { "@babel/core": "^7.10.5", "rollup": "^2.45.1", "@rollup/plugin-babel": "^5.1.0", "rollup-plugin-terser": "^6.1.0" } } ``` |
3
tinyzilan123 220 天前
@coolair 这不是挺清楚的吗,prepare 的时候会允许 npm run build ,即便是使用 pnpm 安装的,安装完成还是需要执行这个命令
https://docs.npmjs.com/cli/v10/using-npm/scripts#npm-install |