From c896accdfa6b394cc039dd82cee34176e77656a5 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Thu, 13 May 2021 15:57:31 +0200 Subject: [PATCH] svelte: backend calls: make localStore import .js extension optional --- src/frontend/SvelteViewEngine.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/SvelteViewEngine.ts b/src/frontend/SvelteViewEngine.ts index 7c0ff5f..efbc307 100644 --- a/src/frontend/SvelteViewEngine.ts +++ b/src/frontend/SvelteViewEngine.ts @@ -203,7 +203,7 @@ export default class SvelteViewEngine extends ViewEngine { logger.info(canonicalName + ' > ', 'Replacing backend calls'); // Skip replace if there is no swaf export - if (!code.match(/import[ \n]+\{[ \n]*locals[ \n]*\}[ \n]+from[ \n]+["'](\.\.\/)+ts\/stores\.js["']/)) { + if (!code.match(/import[ \n]+\{[ \n]*locals[ \n]*\}[ \n]+from[ \n]+["'](\.\.\/)+ts\/stores(\.js)?["']/)) { return { backendCalls: [], code: code,