esnunes / riotjs-loader

riotjs module loader for webpack
MIT License
103 stars 42 forks source link

setup coffescript html parsing #5

Open blahutka opened 9 years ago

blahutka commented 9 years ago

Hi @esnunes do you know how to tweak this in webpack config? This works when I add this to riotjs-loader https://github.com/muut/riotjs/issues/751

riot.parsers.js.coffeescript = riot.parsers.js.coffee;
return riot.compile(content, options);

I need to parse html with this type

<script type="text/coffeescript">
    @test = 'riotjs awesome'
</script>
chaucerbao commented 9 years ago

Try adding query: { type: "coffee" } to your definition.

For example:

preLoaders: [
    { test: /\.tag/, loader: "riotjs", query: { type: "coffee" } }
]