Skip to content

Commit c549024

Browse files
committed
feat: add vite-plugin-component-placeholder plugin to support componentPlaceholder for miniprogram
1 parent 58383d6 commit c549024

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
"z-paging": "2.8.7"
124124
},
125125
"devDependencies": {
126+
"@binbinji/vite-plugin-component-placeholder": "^0.0.8",
126127
"@commitlint/cli": "^19.8.1",
127128
"@commitlint/config-conventional": "^19.8.1",
128129
"@dcloudio/types": "^3.4.8",

vite.config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import path from 'node:path'
22
import process from 'node:process'
3+
/**
4+
* 小程序占位组件 componentPlaceholder
5+
* @ see https://github.com/chouchouji/vite-plugin-component-placeholder
6+
*/
7+
import ComponentPlaceholder from '@binbinji/vite-plugin-component-placeholder'
38
import Uni from '@uni-helper/plugin-uni'
49
import Components from '@uni-helper/vite-plugin-uni-components'
510
// @see https://uni-helper.js.org/vite-plugin-uni-layouts
@@ -143,6 +148,7 @@ export default defineConfig(({ command, mode }) => {
143148
// 若存在改变 pages.json 的插件,请将 UniKuRoot 放置其后
144149
UniKuRoot(),
145150
Uni(),
151+
ComponentPlaceholder(),
146152
// 自动打开开发者工具插件 (必须修改 .env 文件中的 VITE_WX_APPID)
147153
openDevTools(),
148154
],

0 commit comments

Comments
 (0)