Working on a web game and I use parcel.js to bundle my files.
My current workflow is to use my beefy windows PC for local development and when I want to deploy to production, I pull down my changes on my macbook and deploy there.
For some reason I don't know why, when running my build script:
"parcel:build": "yarn cross-env NODE_ENV=production && parcel build src/index.html --no-cache --no-source-maps --public-url replacethislinewithadot && sed -i '' 's/replacethislinewithadot/./g' dist/*.html dist/*.css" produces different results on windows vs mac. (THIS IS WHERE I FOUND THIS HACK: https://github.com/parcel-bundler/parcel/issues/206)
I wrote this script a like 4 years ago and don't recall 100% what the intention was with
sed. I believe css and js files didn't have relative path to the files in the HTML which broke the web game when uploading it.
Running the build script now gives me this error:
sed: can't read s/replacethislinewithadot/./g: No such file or directory while working perfectly on my mac.
Would love to know why this works like it does.