refactor(build): reuse slash for the theme entry regexp

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pull/5342/head
Divyansh Singh 5 days ago
parent 38b59f9252
commit 8bbb71fd73

@ -61,9 +61,7 @@ export async function bundle(
})
const themeEntryRE = new RegExp(
`^${escapeRegExp(
path.resolve(config.themeDir, 'index.js').replace(/\\/g, '/')
).slice(0, -2)}m?(j|t)s`
`^${escapeRegExp(slash(path.resolve(config.themeDir, 'index.js'))).slice(0, -2)}m?(j|t)s`
)
// resolve options to pass to vite

Loading…
Cancel
Save