riot / ssr

Riot.js node Server Side Rendering
MIT License
32 stars 8 forks source link

[feature] add ext option #4

Closed SassNinja closed 5 years ago

SassNinja commented 5 years ago

I'm setting up SSR for riot v4 and would like to keep the file extension .tag However when requiring such files it doesn't work whereas .riot works.

I think the problem is the register module doesn't provide an option to specify a custom file extension.

@GianlucaGuarini can this be added?

GianlucaGuarini commented 5 years ago

Sure please make a PR adding the options object here

I think it might look something like:

register({ ext: '.tag' })
SassNinja commented 5 years ago

Alright, I've submitted a PR and added a test as well!