riot / register

Allow the .riot files importing in node
MIT License
1 stars 2 forks source link

Is it possible to make it possible to import files with extensions other than .riot? #3

Closed nibushibu closed 6 months ago

nibushibu commented 6 months ago

As far as I understand, only the .riot extension can currently be imported using riot/register, but are there any plans to add some option to import files with other extensions?

(I often use .html extensions for my riot files, and would like to import .html in the future if possible.)

GianlucaGuarini commented 6 months ago

We could use the initialize function to define custom file extensions. Would you mind opening a PR to add this feature? Thanks

nibushibu commented 6 months ago

Thanks for the reply!! I wanted to open a PR, but I don't seem to have the permission to create a branch for PR in this repository. (and sorry if I didn't fully understand the intent of your reply.

GianlucaGuarini commented 6 months ago

@nibushibu I will have a look at it asap. Thank you for your feedback!

GianlucaGuarini commented 6 months ago

This feature was added in @riotjs/register@9.1.0 https://github.com/riot/register?tab=readme-ov-file#custom-file-extensions

nibushibu commented 6 months ago

Wow, Thanks a lot!!