1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

Add build config dynamic import assertation type

This commit is contained in:
Deven Caron
2023-02-02 10:00:20 -05:00
parent e4ae03a94c
commit 7c1b61eda9

View File

@@ -2,17 +2,19 @@
* @file Provides simple user configuration options. * @file Provides simple user configuration options.
*/ */
import loconfig from '../../loconfig.json' assert { type: "json" }; import loconfig from '../../loconfig.json' assert { type: 'json' };
let usrconfig; let usrconfig;
try { try {
usrconfig = await import('../../loconfig.local.json'); usrconfig = await import('../../loconfig.local.json', {
assert: { type: 'json' }
});
usrconfig = usrconfig.default; usrconfig = usrconfig.default;
merge(loconfig, usrconfig); merge(loconfig, usrconfig);
} catch (err) { } catch (err) {
// do nothing console.error(err);
} }
export default loconfig; export default loconfig;