Skip to content

Commit 58cfb70

Browse files
committed
chore: cleanup
1 parent 6abecb2 commit 58cfb70

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/vite-plugin-svelte/src/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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) {

packages/vite-plugin-svelte/src/utils/id.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function escapeRE(s) {
172172
*/
173173
export 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))

0 commit comments

Comments
 (0)