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

Improve documentation how to use typescript in webpack.config.js #7537

Open
alexander-akait opened this issue Feb 6, 2025 · 0 comments · May be fixed by #7550
Open

Improve documentation how to use typescript in webpack.config.js #7537

alexander-akait opened this issue Feb 6, 2025 · 0 comments · May be fixed by #7550

Comments

@alexander-akait
Copy link
Member

Feature to document

Page - https://webpack.js.org/api/cli/

Author(s)

Any

Additional information

We need document this - webpack/webpack-cli#3905:

There are 5 ways to use typescript in webpack.config.js

  1. webpack -c ./webpack.config.ts (not all things supported due limitation of rechoir and interpret)
  2. NODE_OPTIONS='--import tsx' webpack --disable-interpret -c ./webpack.config.ts (using custom --import for Node.js)
  3. NODE_OPTIONS='--experimental-strip-types' webpack --disable-interpret -c ./webpack.config.ts (using built-in typescript module for Node.js v22.7.0 >= YOU NODE.JS VERSION < v23.6.0)
  4. webpack --disable-interpret -c ./webpack.config.ts (using built-in typescript module for Node.js >= v22.6.0)
  5. NODE_OPTIONS='--no-experimental-strip-types --import tsx' webpack --disable-interpret -c ./webpack.config.ts (using a tsx for Node.js >= v22.6.0)

[ ] I am willing to work on this issue and submit a pull request.

/cc @snitin315 Can you help me with it?

@Vansh5632 Vansh5632 linked a pull request Feb 15, 2025 that will close this issue
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 a pull request may close this issue.

1 participant