We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 714ace4 commit 22386e6Copy full SHA for 22386e6
lib/build.js
@@ -16,6 +16,15 @@ function getBabelTarget(envConfig) {
16
function webpackConfig(dir, additionalConfig) {
17
var config = conf.load();
18
var envConfig = config.build.environment || config.build.Environment || {};
19
+ var context = (
20
+ process.env.CONTEXT &&
21
+ config.context &&
22
+ config.context[process.env.CONTEXT] &&
23
+ (config.context[process.env.CONTEXT].environment || config.context[process.env.CONTEXT].Environment)
24
+ ) || {};
25
+ Object.keys(context).forEach(key => {
26
+ envConfig[key] = context[key];
27
+ });
28
var babelOpts = { cacheDirectory: true };
29
if (!fs.existsSync(path.join(process.cwd(), ".babelrc"))) {
30
babelOpts.presets = [
0 commit comments