astro-loading-indicator
Advanced tools
Comparing version 0.1.0 to 0.1.1
# astro-loading-indicator | ||
## 0.1.1 | ||
### Patch Changes | ||
- ccfb7ef: Adds HMR support | ||
## 0.1.0 | ||
@@ -4,0 +10,0 @@ |
{ | ||
"name": "astro-loading-indicator", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Display a progress bar between page navigations when using View Transitions", | ||
@@ -32,2 +32,3 @@ "author": { | ||
"dependencies": { | ||
"astro-integration-kit": "^0.0.2", | ||
"nprogress": "^0.2.0" | ||
@@ -34,0 +35,0 @@ }, |
import type { AstroIntegration } from "astro"; | ||
import { createResolver, watchIntegration } from "astro-integration-kit"; | ||
import type { Options } from "./types"; | ||
@@ -8,6 +9,20 @@ import { resolveOptions, resolveTemplate } from "./utils"; | ||
const { resolve } = createResolver(import.meta.url); | ||
return { | ||
name: "astro-loading-indicator", | ||
hooks: { | ||
"astro:config:setup": ({ injectScript }) => { | ||
"astro:config:setup": async ({ | ||
addWatchFile, | ||
command, | ||
injectScript, | ||
updateConfig, | ||
}) => { | ||
await watchIntegration({ | ||
addWatchFile, | ||
command, | ||
dir: resolve(), | ||
updateConfig, | ||
}); | ||
injectScript( | ||
@@ -14,0 +29,0 @@ "page", |
8921
89
3
+ Addedastro-integration-kit@^0.0.2
+ Addedastro-integration-kit@0.0.2(transitive)