Skip to content

Commit bbe91c7

Browse files
authored
fix(vue2): fix vue3 dev startup erro (#2822)
1 parent 3ddfaf2 commit bbe91c7

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

examples/vue2/vite.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ export default defineConfig((config) => {
5252
...['icon', 'icon-saas'].map((lib) => ({
5353
libraryName: `@opentiny/vue-${lib}`,
5454
customName: (name: string) => {
55-
return name === 'default' ? `@opentiny/vue-${lib}$` : `@opentiny/vue-${lib}/${name.replace(/^icon-/, '')}`
55+
return name === 'default'
56+
? `@opentiny/vue-${lib}$`
57+
: `@opentiny/vue-${lib}/${name.replace(/^icon-/, '')}/index.ts`
5658
}
5759
}))
5860
],
@@ -82,6 +84,7 @@ export default defineConfig((config) => {
8284
resolve: {
8385
extensions: ['.js', '.ts', '.tsx', '.vue'],
8486
alias: {
87+
'@mobile-root': pathFromWorkspaceRoot('packages/mobile'),
8588
'@vue/composition-api': path.resolve('node_modules/@vue/composition-api'),
8689
'vue': path.resolve('node_modules/vue/dist/vue.esm.js'),
8790
'@': pathFromWorkspaceRoot('examples/docs/newsrc'),

internals/cli/src/config/vite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const getAlias = (vueVersion: string | number, theme = '', design) => {
3939
...getComponentAlias()
4040
}
4141

42-
if (!design) {
42+
if (!design && vueVersion === 3) {
4343
map['@opentiny/vue-icon'] = pathFromWorkspaceRoot(`packages/vue-icon${ns(design || theme)}/src`)
4444
}
4545

packages/renderless/src/currency/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
import { isUndefined, isNull } from '../grid/static'
14-
import { log } from '../common'
14+
import { log } from '@opentiny/utils'
1515

1616
export const init =
1717
({ state, service, api }) =>

0 commit comments

Comments
 (0)