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