worldzhao / blog

个人博客,内容在 issue 里。
416 stars 16 forks source link

> 我引入了样式没有生效 这是我的项目地址:https://github.com/junxyue/cxh-ui.git #19

Closed Hui-cx closed 12 months ago

Hui-cx commented 12 months ago
          > 我引入了样式没有生效 这是我的项目地址:https://github.com/junxyue/cxh-ui.git
  1. 样式问题:移除 package.json 中的 sideEffects 字段,这个字段影响了样式的引入,被 tree shaking 掉了,可以仔细了解一下这个字段
  2. 代码展示问题:可能是因为你是使用相对路径引入导致的,后面可以优化成用包名展示 如何引入组件 dumi
  3. 组件 tsx 里不需要引入样式

希望可以帮助到你

Originally posted by @worldzhao in https://github.com/worldzhao/blog/issues/4#issuecomment-1717026907