Open handrews opened 6 years ago
'cross-env' can solve the NODE_ENV issue, - by installing 'cross-env' and add 'cross-env' before 'NODE_ENV'. But one still needs to manually fix require paths with forward slashes in 'schema.js'.
Thanks, @zhangyongjing !
The new
@cloudflare/doca
probably doesn't work any better on Windows than the old.require
paths in schema.js use forward slashesbuild
andbuild:nojs
are not Windows-friendly, per @wiggisser in @cloudflare/doca#25:You must set an environment variable by set SOMEVAR=value. Further more this is a separete command so you'll have to add an additional && before the call to webpack like for instance
From @aphilaja in cloudflare/doca#26:
I don't think Windows build has to be a special case:
use rimraf module instead of del and rm -rf. use webpack -p instead of NODE_ENV=production Then it should works equally in win & *nix.
Edit: Hmm.. not sure if -p sets NODE_ENV to production. If that's not the case and the env var is needed, I think there is Webpack plugin for it.