File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { OutputAsset, OutputChunk } from 'rollup'
12
12
const hashRE = / \. ( \w + ) \. j s $ /
13
13
const staticInjectMarkerRE =
14
14
/ \b ( c o n s t _ h o i s t e d _ \d + = \/ \* (?: # | @ ) _ _ P U R E _ _ \* \/ \s * c r e a t e S t a t i c V N o d e ) \( " ( .* ) " , ( \d + ) \) / g
15
- const staticStripRE = / _ _ V P _ S T A T I C _ S T A R T _ _ [ ^ ] * ?_ _ V P _ S T A T I C _ E N D _ _ / g
15
+ const staticStripRE = / [ ' " ` ] _ _ V P _ S T A T I C _ S T A R T _ _ [ ^ ] * ?_ _ V P _ S T A T I C _ E N D _ _ [ ' " ` ] / g
16
16
const staticRestoreRE = / _ _ V P _ S T A T I C _ ( S T A R T | E N D ) _ _ / g
17
17
18
18
// matches client-side js blocks in MPA mode.
@@ -224,7 +224,7 @@ export function createVitePressPlugin(
224
224
bundle [ name + '-lean' ] = {
225
225
...chunk ,
226
226
fileName : chunk . fileName . replace ( / \. j s $ / , '.lean.js' ) ,
227
- code : chunk . code . replace ( staticStripRE , `` )
227
+ code : chunk . code . replace ( staticStripRE , `"" ` )
228
228
}
229
229
230
230
// remove static markers from original code
You can’t perform that action at this time.
0 commit comments