Skip to content

Parcel plugin to set an url for the http client based on NODE_ENV

Notifications You must be signed in to change notification settings

chromstahl-cms/parcel-plugin-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

parcel-plugin-url

Adds the possibillty to set a url for reaching e.g. an api differently in prod and dev environments

How to use

  • run npm i -D @kloudsoftware/parcel-plugin-url
  • create an api.json file:
{
  "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 url
  • you can bypass the config file with the CHROMSTAHL_URL environment variable

About

Parcel plugin to set an url for the http client based on NODE_ENV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published