-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Improve performance of running TypeScript files #261
Comments
Updated project to support SWC, but still relies on |
@psychobolt try use @swc-node/register@1.6.7, it works well |
@yeliex I managed to get my workspace scripts working with the register. The only problem remains is when running ESLint bin in workspace and in VSCode: ESLint bin fails: ESLint server log: [Info - 9:47:01 AM] ESLint server is starting.
[Info - 9:47:08 AM] ESLint server running in node v20.10.0
[Info - 9:47:08 AM] ESLint server is running.
[Info - 9:47:11 AM] ESLint library loaded from: /Users/mitran/Projects/vite-storybook-boilerplate/.yarn/sdks/eslint/lib/unsupported-api.js
2024-01-17T17:47:11.038Z eslint:flat-eslint Override config file path is ./eslint.config.ts
2024-01-17T17:47:11.040Z eslint:flat-eslint Loading config from /Users/mitran/Projects/vite-storybook-boilerplate/eslint.config.ts
2024-01-17T17:47:11.040Z eslint:flat-eslint Config file URL is file:///Users/mitran/Projects/vite-storybook-boilerplate/eslint.config.ts
[Error - 9:47:11 AM] An unexpected error occurred:
[Error - 9:47:11 AM] TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /Users/mitran/Projects/vite-storybook-boilerplate/eslint.config.ts
at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
at defaultLoad (node:internal/modules/esm/load:141:22)
at async nextLoad (node:internal/modules/esm/hooks:865:22)
at async nextLoad (node:internal/modules/esm/hooks:865:22)
at async nextLoad (node:internal/modules/esm/hooks:865:22)
at async Hooks.load (node:internal/modules/esm/hooks:448:20)
at async MessagePort.handleMessage (node:internal/modules/esm/worker:196:18) I am hoping the PR you made will resolve this issue. |
Update: My proposed patch resolves the issue above and includes fix swc-project/swc-node#754 |
Since we already run TypeScript lint, we can disable type checking. Look into the possibility of using SWC instead.
We also need to turn on type checking for all TS files including config files such as
vite.config.ts
...The text was updated successfully, but these errors were encountered: