File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -2,5 +2,9 @@ import { defineConfig } from "astro/config";
22import simpleStackQuery from "simple-stack-query" ;
33
44export default defineConfig ( {
5- integrations : [ simpleStackQuery ( ) ] ,
5+ integrations : [
6+ simpleStackQuery ( {
7+ bypassSnippetsPrompt : true ,
8+ } ) ,
9+ ] ,
610} ) ;
Original file line number Diff line number Diff line change @@ -8,14 +8,20 @@ import { existsSync } from "node:fs";
88
99type VitePlugin = Required < AstroConfig [ "vite" ] > [ "plugins" ] [ number ] ;
1010
11- export default function simpleStackQueryIntegration ( ) : AstroIntegration {
11+ type Options = {
12+ bypassSnippetsPrompt ?: boolean ;
13+ } ;
14+
15+ export default function simpleStackQueryIntegration (
16+ opts ?: Options ,
17+ ) : AstroIntegration {
1218 let root : URL ;
1319 let command : "dev" | "build" | "preview" ;
1420 return {
1521 name : "simple-stack-query" ,
1622 hooks : {
1723 "astro:server:start" : async ( ) => {
18- if ( command === "dev" ) {
24+ if ( command === "dev" && ! opts ?. bypassSnippetsPrompt ) {
1925 setTimeout ( ( ) => {
2026 addSnippets ( { root } ) ;
2127 } , 100 ) ;
You can’t perform that action at this time.
0 commit comments