rollup打包时怎么排除第三方组件所引进的样式文件
Closed this issue · 1 comments
gogoinga commented
项目中,import了一个第三方组件的css文件,打包后出现在了输出文件的styleInject里,请问我要怎么排除掉这个样式文件的打包呢
例如:
import 'node_modules/第三方组件/第三方.css';
import styles from './本地的.less';
jlengstorf commented
(I ran your issue through Google translate, so hopefully I'm answering this correctly)
to exclude a file, I believe you need to set it as external
, which is explained in this comment: rollup/rollup#497 (comment)
if that doesn't work for you, you may have better luck asking on the rollup repo! good luck!