A plugin for the Parcel bundler to subsitute environment variables based on an explicit allow list of keys in vanilla javascript files.
From npm:
npm install auth0/parcel-plugin-envvar-allowlist
This plugin will load a config file located in the root directory of your project named envvar.config.js
.
The config file must export and object with and explicit allowed list of environment variable keys.
module.exports = {
allowed: [
"DOMAIN",
"CLIENT_ID"
]
}
Once installed and configured, simply run Parcel on javascript files.
parcel build app.js --no-content-hash
OR
parcel build app.js ./scripts/*.js --no-content-hash
Note: The --no-content-hash
flag will stop Parcel from adding the content hash to built files.
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
For auth0 related questions/support please use the Support Center.
This project is licensed under the MIT license. See the LICENSE file for more info.