Skip to content

Commit

Permalink
feat: packaging optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Mutter45 committed Aug 18, 2024
1 parent ad2aeb2 commit 67cd61a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
],
"scripts": {
"dev": "cross-env NODE_ENV=development vite build --watch",
"build": "cross-env NODE_ENV=production vite build",
"build": "rimraf dist && cross-env NODE_ENV=production vite build",
"release": "release-it"
},
"peerDependenciesMeta": {
Expand Down
4 changes: 1 addition & 3 deletions packages/docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { defineConfig } from 'vitepress'
import { componentPreview, containerPreview } from '@vitepress-demo-preview/plugin'
import UnoCSS from 'unocss/vite'
import sidebar from './config/sidebar'
import viteConfig from './config/viteConfig'

Expand All @@ -10,7 +9,6 @@ export default defineConfig({
head: [
['link', { rel: 'icon', type: 'image/x-icon', href: '/vue-create-print/logo.svg' }],
],
base: '/vue-create-print/', // 设置站点的基础路径
locales: {
root: {
lang: 'zh-CN',
Expand Down Expand Up @@ -52,5 +50,5 @@ export default defineConfig({
md.use(componentPreview)
},
},
vite: viteConfig,
vite: viteConfig as any,
})
3 changes: 2 additions & 1 deletion packages/docs/.vitepress/config/viteConfig.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import UnoCSS from 'unocss/vite'
import type { UserConfig } from 'vite'
/** vite配置在vitepress存在类型对不上, 暂时采用any解决 */
const config: any = {
const config: UserConfig = {
plugins: [
UnoCSS(),
],
Expand Down
4 changes: 3 additions & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
"author": "Mutter45 <mutter45@foxmail.com>",
"scripts": {
"dev": "vitepress dev",
"build": "vitepress build",
"build:base": "rimraf .\\.vitepress\\dist && vitepress build",
"build": "rimraf .\\.vitepress\\dist && vitepress build --base /vue-create-print/",
"preview": "vitepress preview",
"clear": "rimraf .\\.vitepress\\dist",
"release": "release-it"
},
"dependencies": {
Expand Down

0 comments on commit 67cd61a

Please sign in to comment.