Skip to content

Commit

Permalink
feat(vite): ssr support
Browse files Browse the repository at this point in the history
  • Loading branch information
webfansplz committed Apr 24, 2024
1 parent ff96876 commit 0711ea2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/vite/src/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,11 @@ export default function VitePluginVueDevTools(options?: VitePluginVueDevToolsOpt
if (id === 'virtual:vue-devtools-options')
return `export default ${JSON.stringify({ base: config.base, componentInspector: pluginOptions.componentInspector })}`
},
transform(code, id) {
const { root } = config

const projectPath = `${root}`

if (!id.startsWith(projectPath))
transform(code, id, options) {
if (options?.ssr)
return

const { appendTo } = pluginOptions

const [filename] = id.split('?', 2)

if (appendTo
Expand Down

0 comments on commit 0711ea2

Please sign in to comment.