@@ -142,7 +142,7 @@ export class MemoryBuildCache<State> implements DevBuildCache<State> {
142142 for ( let i = 0 ; i < transformed . length ; i ++ ) {
143143 const file = transformed [ i ] ;
144144 const relative = path . relative ( this . #config. staticDir , file . path ) ;
145- if ( relative . startsWith ( "." ) ) {
145+ if ( relative . startsWith ( ".. " ) ) {
146146 throw new Error (
147147 `Processed file resolved outside of static dir ${ file . path } ` ,
148148 ) ;
@@ -158,7 +158,7 @@ export class MemoryBuildCache<State> implements DevBuildCache<State> {
158158 try {
159159 const filePath = path . join ( this . #config. staticDir , pathname ) ;
160160 const relative = path . relative ( this . #config. staticDir , filePath ) ;
161- if ( ! relative . startsWith ( "." ) && ( await Deno . stat ( filePath ) ) . isFile ) {
161+ if ( ! relative . startsWith ( ".. " ) && ( await Deno . stat ( filePath ) ) . isFile ) {
162162 const pathname = new URL ( relative , "http://localhost" ) . pathname ;
163163 this . addUnprocessedFile ( pathname , this . #config. staticDir ) ;
164164 return this . readFile ( pathname ) ;
@@ -301,8 +301,9 @@ export class DiskBuildCache<State> implements DevBuildCache<State> {
301301 includeDirs : false ,
302302 includeFiles : true ,
303303 followSymlinks : false ,
304- // Skip any folder or file starting with a "."
305- skip : [ / \/ \. [ ^ / ] + ( \/ | $ ) / ] ,
304+ // Skip any folder or file starting with a ".", but allow
305+ // ".well-known" for things like PWA manifests
306+ skip : [ / \/ \. (? ! w e l l - k n o w n ) [ ^ / ] + ( \/ | $ ) / ] ,
306307 } ) ;
307308
308309 for await ( const entry of entries ) {
0 commit comments