File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ if (location.pathname.endsWith("/")) {
5959import ${ preview || page . code . length ? `{${ preview ? "open, " : "" } define} from ` : "" } ${ JSON . stringify (
6060 resolveImport ( "observablehq:client" )
6161 ) } ;${
62- files . size || data ?. sql
62+ files . size
6363 ? `\nimport {registerFile${ data ?. sql ? ", FileAttachment" : "" } } from ${ JSON . stringify (
6464 resolveImport ( "observablehq:stdlib" )
6565 ) } ;`
Original file line number Diff line number Diff line change @@ -123,8 +123,11 @@ export async function getResolvers(
123123
124124 // Add SQL sources.
125125 if ( page . data . sql ) {
126- for ( const source of Object . values ( page . data . sql ) ) {
127- files . add ( String ( source ) ) ;
126+ for ( const value of Object . values ( page . data . sql ) ) {
127+ const source = String ( value ) ;
128+ if ( isAssetPath ( source ) ) {
129+ files . add ( source ) ;
130+ }
128131 }
129132 }
130133
You can’t perform that action at this time.
0 commit comments