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) {
167
167
168
168
transform : {
169
169
async handler ( code , id , opts ) {
170
- log . debug ( `transforming ${ id } ` , undefined , 'transform' ) ;
171
170
const ssr = ! ! opts ?. ssr ;
172
171
const svelteRequest = requestParser ( id , ssr ) ;
173
172
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) {
172
172
*/
173
173
export function buildIdFilter ( options ) {
174
174
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 #
176
176
const extensionsRE = new RegExp (
177
177
`^[^?#]+\\.(?:${ extensions
178
178
. map ( ( e ) => ( e . startsWith ( '.' ) ? e . slice ( 1 ) : e ) )
@@ -211,6 +211,8 @@ export function buildModuleIdFilter(options) {
211
211
exclude = [ ] ,
212
212
extensions = DEFAULT_SVELTE_MODULE_EXT
213
213
} = 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 #
214
216
const infixWithExtRE = new RegExp (
215
217
`^[^?#]+(?:${ infixes . map ( escapeRE ) . join ( '|' ) } )(?:[^.\\\\/]+\\.)*(?:${ extensions
216
218
. map ( ( e ) => ( e . startsWith ( '.' ) ? e . slice ( 1 ) : e ) )
You can’t perform that action at this time.
0 commit comments