mirror of
https://github.com/archtechx/alpine-typescript.git
synced 2025-12-12 14:54:03 +00:00
Automatically register the bootstrapper
This commit is contained in:
parent
f7db3d093c
commit
e7c97d9cc5
2 changed files with 6 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@leanadmin/alpine-typescript",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"description": "TypeScript support for Alpine.js",
|
||||
"main": "dist/index.js",
|
||||
"repository": {
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export function convertClassToAlpineConstructor(component: any): ComponentConstr
|
|||
}
|
||||
}
|
||||
|
||||
export default () => {
|
||||
export function bootstrap(): void {
|
||||
window.AlpineComponents = {};
|
||||
|
||||
const deferrer = window.deferLoadingAlpine || function (callback: CallableFunction) { callback() };
|
||||
|
|
@ -73,3 +73,7 @@ export default () => {
|
|||
deferrer(callback);
|
||||
}
|
||||
}
|
||||
|
||||
if (window.AlpineComponents === undefined) {
|
||||
bootstrap();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue