Open MatthieuLepers opened 1 year ago
Since the Node.js require()
cannot load .ts
files by default, it is not in the default filter.
You can use the filter
option to add lookup for custom loaders you have added to the Node.js runtime, however. Just use that regexp as the filter
option in your ts app.
Actually, maybe it is possible to tell somehow what extensions can be loaded by Node.js, so if .ts
is there we can load me default, otherwise not 🤔
Hello ! I'm making a discord bot using discord.js-commando and i migrate my bot to a typescript project
I figure out an issue with require-all@3.0.0 that is used by discord.js-commando@latest doesn't allow .ts files to be found by default
Maybe you should change the DEFAULT_FILTER regex from
/^([^\.].*)\.js(on)?$/
to/^([^\.].*)\.(?:j|t)s(on)?$/