Skip to content

Commit afde973

Browse files
committed
chore: only preprocess demo files [ci skip]
1 parent 38e4fbf commit afde973

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

svelte.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ const config = {
2020
preprocess(),
2121
optimizeImports(),
2222
{
23-
script: ({ content }) => {
23+
script: ({ content, filename }) => {
24+
if (/node_modules/.test(filename)) return;
25+
if (!/demo/.test(filename)) return;
26+
2427
let code = content;
2528

2629
Object.entries(CONTENT).map(([key, value]) => {

0 commit comments

Comments
 (0)