Problem:
npm run build
failed.
Reproductions steps:
- Clone this repo
- run
npm install
- run
npm run build
- build fails with not indicative error
Insights:
unusedFunc
func insrc/utils/api/auth.js
is bundled to the output in.next
folder although it's not used.- If I comment
genToken
inunusedFunc
func, problem is gone andnpm run build
succeeded
I though webpack is smart and eliminate deadcode...