在使用react时候,添加sass或者less,需要暴露config里的webpack出来,直接npm eject会暴以下错;
Usage: npm
where
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, get, help, help-search, hook, i, init,
install, install-ci-test, install-test, it, link, list, ln,
login, logout, ls, org, outdated, owner, pack, ping, prefix,
profile, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami
npm
npm -l display full usage info
npm help
npm help npm involved overview
Specify configs in the ini-formatted file:
C:\Users\xj\.npmrc
or on the command line via: npm
Config info can be viewed via: npm help config
[email protected] C:\Users\xj\AppData\Roaming\npm\node_modules\npm
正确做法,npm run eject