mod-build 4.0.0-alpha.19d → 4.0.0-alpha.19e
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/src/scripts/utils.js +2 -3
package/package.json
CHANGED
package/src/scripts/utils.js
CHANGED
|
@@ -170,7 +170,7 @@ const handlebarsHelpers = [
|
|
|
170
170
|
]
|
|
171
171
|
|
|
172
172
|
export const updateConfig = (config) => {
|
|
173
|
-
let mergedConfig = config;
|
|
173
|
+
let mergedConfig = { ...config };
|
|
174
174
|
|
|
175
175
|
return {
|
|
176
176
|
name: 'update-config',
|
|
@@ -179,10 +179,9 @@ export const updateConfig = (config) => {
|
|
|
179
179
|
if (file.endsWith('siteconfig.js') || file.endsWith('template.js')) {
|
|
180
180
|
console.log('siteconfig or template changed');
|
|
181
181
|
try {
|
|
182
|
-
const tempConfig = config;
|
|
183
182
|
const configData = fs.readFileSync('src/.tmp/config.json', 'utf8');
|
|
184
183
|
const parsedConfig = JSON.parse(configData);
|
|
185
|
-
mergedConfig = merge(
|
|
184
|
+
mergedConfig = merge(parsedConfig, mergedConfig);
|
|
186
185
|
// overwrite the config file with new data
|
|
187
186
|
fs.writeFileSync('src/.tmp/config.json', JSON.stringify(mergedConfig, null, 2));
|
|
188
187
|
} catch (error) {
|