developit / developit/microbundle

Add `to` option to `rollup-plugin-postcss`

Đang mở
#1,002 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
CSS
Ngôn ngữ chính
JavaScript
Star
8.1k
Fork
358
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

I'm trying to use the [`postcss-url`](https://github.com/postcss/postcss-url) plugin to copy fonts that are imported by my CSS into the build directory. In order for it to work properly it requires the [`to`](https://github.com/egoist/rollup-plugin-postcss#to) option for `rollup-plugin-postcss` to be set.

I was able to get it working locally by setting `to: absMain.replace(EXTENSION, '.css')` here:
https://github.com/developit/microbundle/blob/22187fba8a2d404a9f3dc5db357e243cd45e8479/src/index.js#L495-L498

This is the `postcss.config.js` I'm trying to use:

```js
module.exports = {
plugins: {
'postcss-url': {
url: 'copy',
basePath: '.',
assetsPath: '',
useHash: false,
},
},
};
```

Happy to provide more details, and thanks for your efforts on this great project!

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.