wp-blank-scripts 2.6.12 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/webpack.base.config.js +8 -2
package/package.json
CHANGED
package/webpack.base.config.js
CHANGED
|
@@ -127,10 +127,16 @@ function makeBaseConfig(options) {
|
|
|
127
127
|
|
|
128
128
|
const mainStyleVariables = path.join(sourcePath, 'assets', 'css', 'utils', 'variables.scss');
|
|
129
129
|
|
|
130
|
-
let sassVariables
|
|
130
|
+
let sassVariables = `$env: ${process.env.NODE_ENV};`;
|
|
131
|
+
|
|
132
|
+
for (const key of Object.keys(process.env)) {
|
|
133
|
+
if (key.startsWith('VIVO_')) {
|
|
134
|
+
sassVariables += `$${key.replace('VIVO_', '').toLowerCase()}: ${process.env[key]};`;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
131
137
|
|
|
132
138
|
if (fs.existsSync(mainStyleVariables)) {
|
|
133
|
-
sassVariables
|
|
139
|
+
sassVariables += fs.readFileSync(mainStyleVariables, 'utf8');
|
|
134
140
|
}
|
|
135
141
|
|
|
136
142
|
let loaderOverrides = {};
|