Skip to content

Commit

Permalink
fix: lazy require @vitejs/plugin-vue to respect NODE_ENV
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 5, 2021
1 parent 7c530a5 commit a051e66
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/node/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
MarkdownCompileResult
} from './markdownToVue'
import { DIST_CLIENT_PATH, APP_PATH, SITE_DATA_REQUEST_PATH } from './alias'
import createVuePlugin from '@vitejs/plugin-vue'
import { slash } from './utils/slash'
import { OutputAsset, OutputChunk } from 'rollup'

Expand Down Expand Up @@ -55,7 +54,8 @@ export function createVitePressPlugin(
publicDir: string
) => MarkdownCompileResult

const vuePlugin = createVuePlugin({
// lazy require plugin-vue to respect NODE_ENV in @vue/compiler-x
const vuePlugin = require('@vitejs/plugin-vue')({
include: [/\.vue$/, /\.md$/],
...userVuePluginOptions
})
Expand Down

0 comments on commit a051e66

Please sign in to comment.