riot / rollup-plugin-riot

Rollup Plugin for Riot
https://www.npmjs.com/package/rollup-plugin-riot
MIT License
26 stars 9 forks source link

Cannot set extension to "tag.html" #106

Closed ShiMeiWo closed 5 years ago

ShiMeiWo commented 5 years ago

I used to use extension ".tag.html" by plugin-settings to make Riot tag files, but at v4, rollup shows error that "Unexpected token (Note that you need plugins to import files that are not JavaScript)". It goes well when I change the extension into "html".

riot.config.js

export default {
  hot: false,
  extension: 'tag.html'
}

rollup.config.js

import riot  from 'rollup-plugin-riot'
...
plugins: [
    riot({
      ext: 'tag.html'
    }),
]

Thanks.

GianlucaGuarini commented 5 years ago

For now you can use tag-html or riot. At moment we don't support different dot extensions at same time like foo.tag.html

ShiMeiWo commented 5 years ago

Thank you for your answer. I will try .riot (like foo.riot ).