diff --git a/babel.config.js b/babel.config.js index 1090bc96f..fd3a0b0e9 100644 --- a/babel.config.js +++ b/babel.config.js @@ -14,7 +14,13 @@ module.exports = (api, options) => { '@babel/plugin-proposal-nullish-coalescing-operator', '@babel/plugin-proposal-export-namespace-from', '@babel/plugin-proposal-export-default-from', - ['@babel/plugin-transform-runtime', { useESModules: !modules }] + ['@babel/plugin-transform-runtime', { useESModules: !modules }], + [ + 'transform-inline-environment-variables', + { + include: ['RUN_ENV'] + } + ] ]; return { diff --git a/package-lock.json b/package-lock.json index 2199c0341..36c8eafd2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,6 +68,7 @@ "babel-plugin-istanbul": "^4.1.4", "babel-plugin-lodash": "^3.3.4", "babel-plugin-transform-dev": "^2.0.1", + "babel-plugin-transform-inline-environment-variables": "^0.4.4", "boxen": "^7.1.0", "brfs": "^1.6.1", "chai": "^4.3.5", @@ -5819,6 +5820,12 @@ "node": ">=0.12" } }, + "node_modules/babel-plugin-transform-inline-environment-variables": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-environment-variables/-/babel-plugin-transform-inline-environment-variables-0.4.4.tgz", + "integrity": "sha512-bJILBtn5a11SmtR2j/3mBOjX4K3weC6cq+NNZ7hG22wCAqpc3qtj/iN7dSe9HDiS46lgp1nHsQgeYrea/RUe+g==", + "dev": true + }, "node_modules/babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", @@ -27636,6 +27643,12 @@ "integrity": "sha512-Otu4LeO02yk+KIsDIwOPmI40TjOLT78NKmGlBxQRyq15Gqost9meZKszdi4LIrIWYAQ3plWXTLclK+IWv1DIQg==", "dev": true }, + "babel-plugin-transform-inline-environment-variables": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-environment-variables/-/babel-plugin-transform-inline-environment-variables-0.4.4.tgz", + "integrity": "sha512-bJILBtn5a11SmtR2j/3mBOjX4K3weC6cq+NNZ7hG22wCAqpc3qtj/iN7dSe9HDiS46lgp1nHsQgeYrea/RUe+g==", + "dev": true + }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", diff --git a/package.json b/package.json index d56e180e4..9e097e885 100644 --- a/package.json +++ b/package.json @@ -120,6 +120,7 @@ "babel-plugin-istanbul": "^4.1.4", "babel-plugin-lodash": "^3.3.4", "babel-plugin-transform-dev": "^2.0.1", + "babel-plugin-transform-inline-environment-variables": "^0.4.4", "boxen": "^7.1.0", "brfs": "^1.6.1", "chai": "^4.3.5",