riotjs-loader
riotjs-loader copied to clipboard
Are custom parsers possible?
Is there any way to add a custom css parser using this loader? For example:
preLoaders: [
{
test: /\.tag$/,
exclude: /node_modules/,
loader: 'riotjs-loader',
query: {
type: 'es6',
style: 'myparser',
parsers: {
css: {
myparser: (tagName, css) => {
return css.replace(/@tag/, tag)
}
}
}
}
}
]
I've tried a handful of things, and always get the error Module build failed: Error: Riot parser "css. myparser" is not registered.
when including the style type <style type='myparser'>
.
Thanks!