developit / developit/microbundle

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

オープン
#1,002 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
CSS
主要言語
JavaScript
スター
8.1k
フォーク
358
PR マージ指標
30日以内にマージされた PR はありません

説明

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!

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。