Parcel plugin to set an url for the http client based on NODE_ENV
npm install @kloudsoftware/parcel-plugin-urlAdds the possibillty to set a url for reaching e.g. an api differently in prod and dev environments
- run npm i -D @kloudsoftware/parcel-plugin-url
- create an api.json file:
``json`
{
"url": {
"prod": "Production url here",
"dev": "Dev url here"
}
}
- run your parcel as normal
- when run with build, parcel will use the prod url, otherwise the dev urlCHROMSTAHL_URL` environment variable
- you can bypass the config file with the