riot / webpack-loader

Riot official webpack loader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding custom parsers doesn't work

lancetharper opened this issue · comments

I was trying to follow this comment to get prefixing/postcss working and cannot get it to do so.

I realize the example isn't using this loader (though I believe that loader is no longer supported), and that I am using webpack 2 and all of the examples I've seen are webpack 1, but I'm not having any webpack 2 specific problems.

It seems to be that this loader doesn't support all of the riot config options. If that is the case, please update the readme with better usage docs as noted in #2 for what is supported

I ran into the same problem trying to get prefixing/postcss working for my setup. Although it doesn't change the fact that the loader doesn't seem to support adding custom parsers in its options, I managed to get postcss to work by adding the following into my webpack.config.js, then using style type="postcss". I hope this helps anyone looking for a solution!

https://gist.github.com/sowhatdoido/fd1bf8af9b651c8c58d3b87aeebf0f0f

Just as a heads up:

This only works if you're using postcss for autoprefixer. If you try and use something like postcss-import (or any other async plugin), this method won't work because async parsers aren't supported

closing this issue due to inactivity