Skip to content

Commit

Permalink
fix: ssr error
Browse files Browse the repository at this point in the history
  • Loading branch information
Jevon617 committed Feb 16, 2023
1 parent bcba05b commit dfe8dc3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/vue3-vite/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default defineConfig({
return nameArr.join('-').replace(/\.svg$/, '')
},
optimizeOptions: undefined,
vueVersion: 3,
}),
],
})
2 changes: 1 addition & 1 deletion src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const unplugin = createUnplugin<Options>(options => ({
},
vite: {
async load(_, ssr) {
if (ssr)
if (ssr?.ssr)
return null
return {
code: moduleCode,
Expand Down

0 comments on commit dfe8dc3

Please sign in to comment.