svelte: backend calls: make localStore import .js extension optional
This commit is contained in:
parent
76fa44c245
commit
c896accdfa
@ -203,7 +203,7 @@ export default class SvelteViewEngine extends ViewEngine {
|
|||||||
logger.info(canonicalName + ' > ', 'Replacing backend calls');
|
logger.info(canonicalName + ' > ', 'Replacing backend calls');
|
||||||
|
|
||||||
// Skip replace if there is no swaf export
|
// 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 {
|
return {
|
||||||
backendCalls: [],
|
backendCalls: [],
|
||||||
code: code,
|
code: code,
|
||||||
|
Loading…
Reference in New Issue
Block a user