-
Notifications
You must be signed in to change notification settings - Fork 41
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
refactor: use @copilot-extensions/preview-sdk
#3
Conversation
Hmm the dev server fails now, any idea?
|
I would expect the TS compiler to handle this for us? That's likely why the dev script is failing. |
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.
Fixed it by moving to use tsx
instead of nodemon/ts-node
, which has better support for ESM out of the box. Starts up fine now.
It would need more than transpiling, because the underlying node code cannot import files without file extensions. The build step would take each relative import path and find out to which file it resolves, then dynamically add the file extension or |
This pull request
@copilot-extensions/preview-sdk
.js
extension is necessary for imports in ESM apps.The SDK will have to be a native ES Module. Octokit was updated to ESM across all its SDKs. So we should encourage integrators to build apps as ES Modules from the getgo if they want to take advantage of the new SDK and the latest @octokit
The only relevant change is 89233db, it shows the code that can be removed form the app.