Skip to content

Commit

Permalink
fix: vite scanImport warning
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Oct 2, 2021
1 parent e784a85 commit 2dbbba5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/slidev/node/server.ts
@@ -1,3 +1,4 @@
import { join } from 'path'
import { createServer as createViteServer, InlineConfig, mergeConfig, resolveConfig } from 'vite'
import { ResolvedSlidevOptions, SlidevServerOptions } from './options'
import { ViteSlidevPlugin } from './plugins/preset'
Expand All @@ -17,6 +18,11 @@ export async function createServer(
mergeConfig(
viteConfig,
<InlineConfig>({
optimizeDeps: {
entries: [
join(options.clientRoot, 'main.ts'),
],
},
plugins: [
await ViteSlidevPlugin(options, pluginOptions, serverOptions),
],
Expand Down

0 comments on commit 2dbbba5

Please sign in to comment.