Skip to content

Commit 165f45a

Browse files
fix: Vite sourcemap warning
1 parent aa9d4f7 commit 165f45a

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lib/extra/vite-plugin/utils.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ export async function getSpank() {
1919
}
2020

2121
export const stripLogs = async (id, code) =>
22-
id.match(/routify3?\/lib/) &&
23-
code
24-
.replace(/\/\/ *routify-dev-only-start[\s\S]+?\/\/ *routify-dev-only-end/gim, '')
25-
.replace(/.+ \/\/ *routify-dev-only/gi, '')
22+
id.match(/routify3?\/lib/) && {
23+
code: code
24+
.replace(
25+
/\/\/ *routify-dev-only-start[\s\S]+?\/\/ *routify-dev-only-end/gim,
26+
'',
27+
)
28+
.replace(/.+ \/\/ *routify-dev-only/gi, ''),
29+
map: null,
30+
}
2631

2732
export const optionsCheck = (options, isProduction) => {
2833
const depprecationNote =

0 commit comments

Comments
 (0)