jd-opensource / jd-opensource/taro-ui

仿taroUI私有组件库 样式引用问题

Open
#1,320 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.7k
Forks
740
PR merge metrics
No merged PRs in 30d

Description

仿taro ui搭了一个私有组件库。想把公共样式提取到组件库中。

build:ui打包后dist结构如下:

![image](https://user-images.githubusercontent.com/21194195/113391962-f0576880-93c6-11eb-9f3a-6d75a574f45c.png)

但是在项目中引用的时候,编译报错:
![image](https://user-images.githubusercontent.com/21194195/113392022-082eec80-93c7-11eb-92c8-8b6a09a2627c.png)

![image](https://user-images.githubusercontent.com/21194195/113392035-0e24cd80-93c7-11eb-9558-765379c5b4c8.png)

仔细比较了之后,也参考taro ui ,在package.json中加入了,sideEffects:

![image](https://user-images.githubusercontent.com/21194195/113392091-27c61500-93c7-11eb-8991-08e39c9fea05.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.