Skip to content

Commit

Permalink
fix: fix Vue production mode breaking PDF Export (#1245) (#1247)
Browse files Browse the repository at this point in the history
  • Loading branch information
ev45ive committed Feb 16, 2024
1 parent f395b29 commit fd4d28f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 0 additions & 2 deletions packages/slidev/node/cli.ts
Expand Up @@ -391,7 +391,6 @@ cli.command(
.help(),
async (args) => {
const { entry, theme } = args
process.env.NODE_ENV = 'production'
const { exportSlides, getExportOptions } = await import('./export')
const port = await findFreePort(12445)

Expand Down Expand Up @@ -444,7 +443,6 @@ cli.command(
output,
timeout,
}) => {
process.env.NODE_ENV = 'production'
const { exportNotes } = await import('./export')
const port = await findFreePort(12445)

Expand Down
4 changes: 4 additions & 0 deletions packages/slidev/node/server.ts
Expand Up @@ -35,6 +35,10 @@ export async function createServer(
plugins: [
await ViteSlidevPlugin(options, config.slidev || {}, serverOptions),
],
define: {
// Fixes Vue production mode breaking PDF Export #1245
__VUE_PROD_DEVTOOLS__: JSON.stringify(true),
},
},
),
)
Expand Down

0 comments on commit fd4d28f

Please sign in to comment.