Skip to content

Commit

Permalink
chore: fixed building error
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoluoboding committed Mar 28, 2023
1 parent ac519f3 commit 5a2f4ac
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,22 @@ export default defineConfig(({ command, mode }) => {
// console.log(command)
// console.log(mode)

const commonPlugins = [
vue(),
dts({
include: './packages'
}),
UnoCSS(),
Components({
resolvers: [
IconsResolver({
prefix: ''
})
]
}),
Icons()
]

if (mode === 'lib') {
userConfig.build = {
lib: {
Expand All @@ -35,6 +51,7 @@ export default defineConfig(({ command, mode }) => {
}
}
}
userConfig.plugins = [...commonPlugins, libInjectCss()]
}

return {
Expand All @@ -44,22 +61,7 @@ export default defineConfig(({ command, mode }) => {
'~': resolve(__dirname, '/src')
}
},
plugins: [
vue(),
dts({
include: './packages'
}),
UnoCSS(),
Components({
resolvers: [
IconsResolver({
prefix: ''
})
]
}),
Icons(),
libInjectCss()
],
plugins: [...commonPlugins],
...userConfig
}
})

1 comment on commit 5a2f4ac

@vercel
Copy link

@vercel vercel bot commented on 5a2f4ac Mar 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

vue-sonner – ./

vue-sonner-xlbd.vercel.app
vue-sonner-git-main-xlbd.vercel.app
vue-sonner.vercel.app

Please sign in to comment.