alibaba-fusion / next

🦍 A configurable component library for web built on React.
https://fusion.design
MIT License
4.59k stars 591 forks source link

[Icon]fusion主题扩展图标引入了不能显示 #3341

Closed Ryokai96 closed 3 years ago

Ryokai96 commented 3 years ago

Component

Icon

Steps to reproduce

import { Icon } from '@alifd/next'; 引入Icon组件后\<Icon type="moon" />无法显示主题中的扩展图标moon 而\<Icon type="smile" />这些自带图标可以正常显示

package.json内容如下: { "name": "yorokobu-web", "version": "0.1.0", "description": "轻量级模板,使用 TypeScript,仅包含基础的 Layout。", "dependencies": { "@alifd/next": "^1.23.5", "@alifd/theme-yorokobu": "0.2.0", "moment": "^2.24.0", "react": "^17.0.2", "react-dom": "^17.0.2", "react-router-dom": "^5.3.0" }, "devDependencies": { "@iceworks/spec": "^1.0.0", "@types/react": "^17.0.2", "@types/react-dom": "^17.0.2", "build-plugin-fusion": "^0.1.18-rc.1", "build-plugin-moment-locales": "^0.1.0", "eslint": "^7.30.0", "ice.js": "^2.0.0-rc.3", "stylelint": "^13.2.0" }, "scripts": { "start": "icejs start", "build": "icejs build", "lint": "npm run eslint && npm run stylelint", "eslint": "eslint --cache --ext .js,.jsx,.ts,.tsx ./", "eslint:fix": "npm run eslint -- --fix", "stylelint": "stylelint \"*/.{css,scss,less}\"" }, "repository": { "type": "git", "url": "https://github.com/alibaba-fusion/materials/tree/master/scaffolds/scaffold-lite" }, "private": true, "originTemplate": "@alifd/scaffold-lite" }

build.json内容如下: { "vite": true, "plugins": [ [ "build-plugin-fusion", { "themePackage": "@alifd/theme-yorokobu", "themeConfig": { "css-prefix": "yorokobu-" } } ], [ "build-plugin-moment-locales", { "locales": ["zh-cn"] } ] ] }

youluna commented 3 years ago

我这里测试,这个包是正常工作的,你check下是不是没有更新 npm update image

Ryokai96 commented 3 years ago

好像是vite模式下不行,关闭vite模式能正常显示