Skip to content
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

Upgrade Typescipt and @typescript-eslint/parser #826

Merged
merged 2 commits into from
May 29, 2024
Merged

Conversation

L4Ph
Copy link
Contributor

@L4Ph L4Ph commented May 28, 2024

  1. Viteで推奨されている"moduleResolution": "bundler"が動作しないため、Typescriptをv5へアップグレード
  2. その過程でビルド時に大量に発生するLine 0: Parsing error: DeprecationError: 'originalKeywordKind' has been deprecated since v5.0.0 and can no longer be used. Use 'identifierToKeywordKind(identifier)' insteadというエラーを解消するために@typescript-eslint/parserをv7へアップグレード

@yoichiro
Copy link
Collaborator

@L4Ph When executing yarn start to launch the server locally, the server can't be launched with the following error occurs:

Failed to compile.

./node_modules/date-fns/intervalToDuration.mjs
Can't import the named export 'differenceInHours' from non EcmaScript module (only default export is available)

@L4Ph
Copy link
Contributor Author

L4Ph commented May 29, 2024

Maybe adding the following to webpack.config.js will fix the problem.
Should I send the branches separately?
@yoichiro

// webpack.config.js
// module.rules
{
  test: /\.mjs$/,
  include: /node_modules/,
  type: 'javascript/auto',
}

@yoichiro
Copy link
Collaborator

@L4Ph Thank you for the suggestion. Yes, I know that this issue will be solved when appending the definition into the webpack.config.js file. However, we can't have a webpack.config.js file because we're using the react-scripts currently.

@L4Ph
Copy link
Contributor Author

L4Ph commented May 29, 2024

@yoichiro
Thank you, CRA forgot to mention that Webpack is hidden.

There are two possible approaches:

  1. Use react-app-rewired to patch Webpack
  2. Prioritize Vite's support

To be honest, the first point will cause the response to Vite to be increasingly delayed and there is a possibility that it will "break" the CRA.

@yoichiro
Copy link
Collaborator

To be honest, the first point will cause the response to Vite to be increasingly delayed and there is a possibility that it will "break" the CRA.

@L4Ph Yes, I feel same thing actually as well. I think that we need to progress forward to migrate "Webpack" to "Vite". That is, we should take a risk of failure of launching the server locally rather than supporting the Webpack5. Of course, to do that, we need to progress to support "Vite" quickly.

If you agree my proposal, I merge this pull request. How about it?

@L4Ph
Copy link
Contributor Author

L4Ph commented May 29, 2024

@yoichiro

If that's okay with you, I support that too.
I will do my best to support Vite.

@yoichiro
Copy link
Collaborator

@L4Ph Thank you for your contributions! I merge this pull request. Move forward to supporting Vite!

@yoichiro yoichiro merged commit 705016b into remap-keys:main May 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants