We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 097fc30 commit 0574e65Copy full SHA for 0574e65
2 files changed
packages/slidev/node/plugins/config.ts
@@ -2,6 +2,7 @@ import { InlineConfig, mergeConfig, Plugin } from 'vite'
2
import { getIndexHtml } from '../common'
3
import { dependencies } from '../../../client/package.json'
4
import { ResolvedSlidevOptions } from '../options'
5
+import { toAtFS } from '../utils'
6
7
const EXCLUDE = [
8
'@slidev/types',
@@ -14,7 +15,7 @@ export function createConfigPlugin(options: ResolvedSlidevOptions): Plugin {
14
15
const injection: InlineConfig = {
16
resolve: {
17
alias: {
- '@slidev/client/': `${options.clientRoot}/`,
18
+ '@slidev/client/': `${toAtFS(options.clientRoot)}/`,
19
},
20
21
optimizeDeps: {
packages/slidev/node/plugins/entry.ts
@@ -1,11 +1,12 @@
1
import { existsSync } from 'fs'
import { join, resolve } from 'path'
+import { slash } from '@antfu/utils'
import { Plugin } from 'vite'
import { toAtFS } from '../utils'
export function createEntryPlugin({ clientRoot, themeRoots, userRoot }: ResolvedSlidevOptions): Plugin {
- const mainEntry = resolve(clientRoot, 'main.ts')
9
+ const mainEntry = slash(resolve(clientRoot, 'main.ts'))
10
11
return {
12
name: 'slidev:entry',
@@ -16,9 +17,9 @@ export function createEntryPlugin({ clientRoot, themeRoots, userRoot }: Resolved
async function scanStyle(root: string) {
const styles = [
- join(root, 'styles/index.ts'),
- join(root, 'styles/index.js'),
- join(root, 'styles/index.css'),
+ join(root, 'styles', 'index.ts'),
+ join(root, 'styles', 'index.js'),
22
+ join(root, 'styles', 'index.css'),
23
join(root, 'styles.css'),
24
join(root, 'style.css'),
25
]
0 commit comments