Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
fix: Fix the problem that the plugin fails on the vite development se…
Browse files Browse the repository at this point in the history
…rver
  • Loading branch information
baiwusanyu-c committed May 30, 2023
1 parent 73878c0 commit 3e4ab77
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"@types/fs-extra": "^11.0.1",
"@types/gulp": "^4.0.10",
"@types/node": "^20.1.3",
"@vitejs/plugin-vue": "^4.2.2",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.0.1",
"@vitest/coverage-c8": "^0.31.0",
"@vitest/ui": "^0.31.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/sub-style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ export const unVueCESubStyle = (): any => {
injectVueRuntime(mgcStr)

// dev only
if (id.includes('.vite/deps/vue.js'))
if (id.includes('.vite/deps/vue.js')
|| (id.includes('.vite/deps/chunk') && code.includes('__isVue')))
injectVueRuntime(mgcStr)

return {
Expand Down
3 changes: 2 additions & 1 deletion packages/switch-shadow/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export const unVueCEShadow = (): any => {
// injectVueRuntime(mgcStr)

// dev only
if (id.includes('.vite/deps/vue.js'))
if (id.includes('.vite/deps/vue.js')
|| (id.includes('.vite/deps/chunk') && code.includes('__isVue')))
console.log(id)

// injectVueRuntime(mgcStr)
Expand Down
3 changes: 2 additions & 1 deletion packages/v-model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export const unVueCEVModel = (): any => {
injectEmit(mgcStr)

// dev only
if (id.includes('.vite/deps/vue.js')) {
if (id.includes('.vite/deps/vue.js')
|| (id.includes('.vite/deps/chunk') && code.includes('__isVue'))) {
injectVueRuntime(mgcStr)
injectIsCEModifiers(mgcStr, true)
}
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3e4ab77

Please sign in to comment.