Add `to` option to `rollup-plugin-postcss`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript, rollup
- Domain
- build-system, tooling
Research direction
Start in src/index.js around lines 495-498, where the Rollup PostCSS configuration is created. Review how the output CSS path is available there and how the postcss-url configuration uses the to option. Done means the option is passed so imported fonts can be copied into the build directory, with the reported postcss.config.js scenario working as intended.
Written by the indexing model from the issue text.
Description
I'm trying to use the 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 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:
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!
- Dominant language
- JavaScript
- Stars
- 8.1k
- Forks
- 358
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from developit/microbundle
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
developit/microbundle#789 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
developit/microbundle#1100 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
developit/microbundle#1094 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
developit/microbundle#1093 · 3 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
developit/microbundle#1092 ·
All issues in developit/microbundle
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·
-
client-controller-update ta-bot-triage team-money-movement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
MetaMask/metamask-mobile#36594 ·