File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
packages/vite-plugin-svelte/src Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,6 @@ export function svelte(inlineOptions) {
167167
168168 transform : {
169169 async handler ( code , id , opts ) {
170- log . debug ( `transforming ${ id } ` , undefined , 'transform' ) ;
171170 const ssr = ! ! opts ?. ssr ;
172171 const svelteRequest = requestParser ( id , ssr ) ;
173172 if ( ! svelteRequest || svelteRequest . query . type === 'style' || svelteRequest . raw ) {
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ function escapeRE(s) {
172172 */
173173export function buildIdFilter ( options ) {
174174 const { include = [ ] , exclude = [ ] , extensions = DEFAULT_SVELTE_EXT } = options ;
175- // the final regex looks like this
175+ // this regex combines configured extensions and looks for them at the end of the string or directly before first ? or #
176176 const extensionsRE = new RegExp (
177177 `^[^?#]+\\.(?:${ extensions
178178 . map ( ( e ) => ( e . startsWith ( '.' ) ? e . slice ( 1 ) : e ) )
@@ -211,6 +211,8 @@ export function buildModuleIdFilter(options) {
211211 exclude = [ ] ,
212212 extensions = DEFAULT_SVELTE_MODULE_EXT
213213 } = options . experimental ?. compileModule ?? { } ;
214+ // this regex combines configured infixes and extensions
215+ // and looks for them at the end of the string or directly before first ? or #
214216 const infixWithExtRE = new RegExp (
215217 `^[^?#]+(?:${ infixes . map ( escapeRE ) . join ( '|' ) } )(?:[^.\\\\/]+\\.)*(?:${ extensions
216218 . map ( ( e ) => ( e . startsWith ( '.' ) ? e . slice ( 1 ) : e ) )
You can’t perform that action at this time.
0 commit comments