Skip to content

Commit

Permalink
fix: taro/components 组件的使用,taro:h5 启动报错 (#357)
Browse files Browse the repository at this point in the history
  • Loading branch information
oasis-cloud authored Oct 24, 2022
1 parent 8d87260 commit ee2a685
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@
"@rollup/plugin-typescript": "^8.3.0",
"@tarojs/components": "^3.5.5",
"@tarojs/taro": "^3.5.5",
"@tarojs/plugin-platform-weapp": "^3.5.7",
"@tarojs/taro-loader": "^3.5.7",
"@testing-library/jest-dom": "^5.16.3",
"@testing-library/react": "^13.3.0",
"@types/jest": "^27.4.1",
Expand Down
1 change: 0 additions & 1 deletion src/packages/button/button.taro.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import React, {
useState,
} from 'react'
import Icon from '@/packages/icon/index.taro'

import { IComponent, ComponentDefaults } from '@/utils/typings'

export interface ButtonProps extends IComponent {
Expand Down
8 changes: 2 additions & 6 deletions src/sites/mobile-taro/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,10 @@ const config = {
plugins: ['@tarojs/plugin-html'],
compiler: 'webpack5',
alias: {
react: path.resolve(__dirname, '../node_modules/react'),
react: path.resolve(__dirname, '../../../../node_modules/react'),
'@/packages': path.resolve(__dirname, '../../../../src/packages'),
'@/utils': path.resolve(__dirname, '../../../../src/utils'),
'@': path.resolve(__dirname, '../../../../src'),
'@tarojs/components': path.resolve(
__dirname,
'../node_modules/@tarojs/components'
),
'@tarojs/react': path.resolve(__dirname, '../node_modules/@tarojs/react'),
},
sass: {
resource: path.resolve(__dirname, '../../../', 'styles/variables.scss'),
Expand Down Expand Up @@ -79,6 +74,7 @@ const config = {
devServer: {},
},
},
isWatch: true,
}

module.exports = function (merge) {
Expand Down

0 comments on commit ee2a685

Please sign in to comment.