Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: refactor the loader as a postcss plugin #196

Open
yfwz100 opened this issue Apr 17, 2021 · 6 comments
Open

Proposal: refactor the loader as a postcss plugin #196

yfwz100 opened this issue Apr 17, 2021 · 6 comments

Comments

@yfwz100
Copy link

yfwz100 commented Apr 17, 2021

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?

@bholloway
Copy link
Owner

bholloway commented Apr 18, 2021

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.

@bholloway bholloway changed the title Is it possible to refactor the loader as a postcss plugin? Proposal: refactor the loader as a postcss plugin Apr 18, 2021
@yfwz100
Copy link
Author

yfwz100 commented Apr 21, 2021

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.

@bholloway
Copy link
Owner

bholloway commented May 1, 2021

Not ideal but good that you are unblocked @yfwz100.

@bholloway
Copy link
Owner

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?

@yfwz100
Copy link
Author

yfwz100 commented May 21, 2021

It seems that it's not active any more. I'll try it later.

@Pong420
Copy link

Pong420 commented Aug 24, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants