-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type definition files should not attempt to be loaded #65
Comments
I agree, we shouldn't load the |
franky47
added a commit
to franky47/fastify-autoload
that referenced
this issue
Feb 19, 2020
franky47
added a commit
to franky47/fastify-autoload
that referenced
this issue
Feb 19, 2020
franky47
added a commit
to franky47/fastify-autoload
that referenced
this issue
Feb 19, 2020
mcollina
pushed a commit
that referenced
this issue
Feb 20, 2020
* fix: Ignore TS definition files Closes #65. * doc: Mention in readme that .d.ts are ignored Relates to #65. * fix: Negative lookbehind does not work in Node 6 Use a more direct approach for the regex, from: https://stackoverflow.com/a/43493203 * chore: Remove mention of issue #65 in comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
馃悰 Bug Report
When using
includeTypeScript: true
, fastify-autload will attempt to load type definition files (.d.ts
), causing syntax errors, such as Cannot use import statement outside a module.This happens when Node is started into a directory built from TypeScript sources into a set of
.js
&.d.ts
files.To Reproduce
Reproduction repository available here:
https://github.com/franky47/fastify-autoload-65
Expected behavior
Since Node.js cannot understand type definition files, and they contain no runtime code, I believe the extension
.d.ts
should be ignored, even whenincludeTypeScript
is true.Your Environment
The text was updated successfully, but these errors were encountered: