Open yfwz100 opened 3 years ago
Its plausible that the algorithm could be done just in postcss
but as far as I can tell it would need to be the first plugin so that it could use the incoming source-map. Its not a trivial change though, particularly if we want to have test coverage.
This proposal would need a substantial number of upvotes. Please 👍 to add your vote.
I found a stupid way to overcome this issue: compile scss to css via webpack & this plugin first and then feed the css to vite, which can perfectly rebase relative paths.
Not ideal but good that you are unblocked @yfwz100.
Looks like @paraofheaven has already tried a simple conversion with postcss-resolve-url on npm.
@paraofheaven I don't see much usage is this currently working?
It seems that it's not active any more. I'll try it later.
The package postcss-resolve-url cannot be used, it looks like a copy from Next.js
I switch from webpack to vite/rollup and miss the counterpart of this plugin in vite/rollup. Don't know if it's possible to publish a plugin for postcss or rollup as well?