-
Notifications
You must be signed in to change notification settings - Fork 18
feat: add register .ts file #21
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
lib/load_api.js
Outdated
| } | ||
|
|
||
| if (stat.isFile() && path.extname(name) === '.js') { | ||
| if (stat.isFile() && /\.(js|ts)$/.test(path.extname(name))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe should use app.loader.loadFile(), cc @whxaxes
lib/load_api.js
Outdated
| } | ||
|
|
||
| if (stat.isFile() && path.extname(name) === '.js') { | ||
| if (stat.isFile() && /\.(js|ts)$/.test(path.extname(name))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ '.js', '.ts' ].includes(path.extname(name)) seems better than regexp
|
any progress ? |
Codecov Report
@@ Coverage Diff @@
## master #21 +/- ##
=======================================
Coverage 96.75% 96.75%
=======================================
Files 5 5
Lines 185 185
=======================================
Hits 179 179
Misses 6 6
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #21 +/- ##
=======================================
Coverage 96.75% 96.75%
=======================================
Files 5 5
Lines 185 185
=======================================
Hits 179 179
Misses 6 6
Continue to review full report at Codecov.
|
之前直接 install 我克隆的仓库,就把这个 pr 给忘了😂 |
I create a new pr, fixed lint error, #23 |
Checklist
npm testpassesAffected core subsystem(s)
Description of change