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:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user