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

Commit 3fadd1b

Browse files
committed
fix: fix webpack error
1 parent d91799e commit 3fadd1b

File tree

6 files changed

+14
-5
lines changed

6 files changed

+14
-5
lines changed

build/dir.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
export const entry = {
22
'sub-style': '../packages/sub-style/index.ts', // @unplugin-vue-ce/sub-style
33
'v-model': '../packages/v-model/index.ts', // @unplugin-vue-ce/v-model
4-
'switch-shadow': '../packages/switch-shadow/index.ts', // @unplugin-vue-ce/switch-shadow
4+
// 'switch-shadow': '../packages/switch-shadow/index.ts', // @unplugin-vue-ce/switch-shadow
55
'utils': '../utils/index.ts', // @unplugin-vue-ce/utils
66
'index': '../packages/core/index.ts', // unplugin-vue-ce
77
}
88

99
export const entryPkg = {
1010
'v-model': '../packages/v-model',
11-
'switch-shadow': '../packages/switch-shadow',
11+
// 'switch-shadow': '../packages/switch-shadow',
1212
'sub-style': '../packages/sub-style',
1313
'utils': '../utils',
1414
}

build/publish.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ export default series(
55
runTask('publish @unplugin-vue-ce/utils', 'cd dist/utils && pnpm run publish:npm'),
66
runTask('publish @unplugin-vue-ce/v-model', 'cd dist/v-model && pnpm run publish:npm'),
77
runTask('publish @unplugin-vue-ce/sub-style', 'cd dist/sub-style && pnpm run publish:npm'),
8-
runTask('publish @unplugin-vue-ce/switch-shadow', 'cd dist/switch-shadow && pnpm run publish:npm'),
8+
// runTask('publish @unplugin-vue-ce/switch-shadow', 'cd dist/switch-shadow && pnpm run publish:npm'),
99
runTask('publish unplugin-vue-ce', 'cd dist && pnpm run publish:npm'),
1010
)

packages/core/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { unVueCEVModel } from '@unplugin-vue-ce/v-model'
22
import { unVueCESubStyle } from '@unplugin-vue-ce/sub-style'
3-
import { unVueCEShadow } from '@unplugin-vue-ce/switch-shadow'
3+
// import { unVueCEShadow } from '@unplugin-vue-ce/switch-shadow'
44
import { createUnplugin } from 'unplugin'
55
const unplugin = createUnplugin(() => {
66
return [
77
unVueCEVModel(),
88
unVueCESubStyle(),
9-
unVueCEShadow(),
9+
// unVueCEShadow(),
1010
]
1111
})
1212
export const viteVueCE = unplugin.vite

packages/sub-style/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ export const unVueCESubStyle = (): any => {
99
return {
1010
name: `${NAME}:sub-style`,
1111
enforce: 'post',
12+
transformInclude(id: string) {
13+
return id.endsWith('.js')
14+
},
1215
async transform(code: string, id: string) {
1316
const mgcStr = new MagicString(code)
1417

packages/switch-shadow/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export const unVueCEShadow = (): any => {
88
return {
99
name: `${NAME}:switch-shadow`,
1010
enforce: 'post',
11+
transformInclude(id: string) {
12+
return id.endsWith('.js')
13+
},
1114
async transform(code: string, id: string) {
1215
const mgcStr = new MagicString(code)
1316

packages/v-model/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ export const unVueCEVModel = (): any => {
1111
return {
1212
name: `${NAME}:v-model`,
1313
enforce: 'post',
14+
transformInclude(id: string) {
15+
return id.endsWith('.js')
16+
},
1417
async transform(code: string, id: string) {
1518
const mgcStr = new MagicString(code)
1619
// build only

0 commit comments

Comments
 (0)