Skip to content

Instantly share code, notes, and snippets.

Avatar

Øyvind Saltvik fivethreeo

View GitHub Profile
@fivethreeo
fivethreeo / razzle-plugin-node-runtime-vars.js
Last active Feb 11, 2020 — forked from mattlubner/razzle-plugin-node-runtime-vars.js
Razzle plugin to force certain environment variables to be resolved dynamically at runtime for the nodejs bundle
View razzle-plugin-node-runtime-vars.js
/**
* The passed list of environment variables will be removed from the nodejs
* instance of webpack.DefinePlugin, so they can be resolved dynamically at
* runtime.
* @example
* // Include this in the plugins array exported by razzle.config.js
* const nodeRuntimeVarsPlugin = createRazzlePluginNodeRuntimeVars('PORT', 'HOST');
* @param {String} ...nodeRuntimeVars
* @return {Function}
*/
You can’t perform that action at this time.