Skip to content

Commit 1ac2207

Browse files
committed
feat(core): add build meta data to window.bolt.meta
1 parent e3d96e4 commit 1ac2207

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/core/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './elements';
2+
import { getData } from './data/get-data';
23

34
export * from './data';
45
export * from './polyfills';
@@ -13,3 +14,16 @@ if (typeof module.hot === 'object') {
1314
}
1415
});
1516
}
17+
18+
window.bolt = window.bolt || {};
19+
20+
if (!window.bolt.meta) {
21+
setTimeout(() => {
22+
getData('meta')
23+
.then(data => {
24+
console.log({ data });
25+
window.bolt.meta = data;
26+
})
27+
.catch(console.log.bind(console));
28+
}, 100);
29+
}

0 commit comments

Comments
 (0)