-
-
Notifications
You must be signed in to change notification settings - Fork 625
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
Missing types for programmatic usage with TypeScript and Node #2757
Comments
Did you enable |
Hey, thanks for the suggestion. That configuration flag does indeed resolve the compilation issue however (I could be wrong but) I believe using |
I agree with you. So you might take But we have planned to pre-compile dependencies of Rspack, which should solve this problem. Thanks for your feedback. It's very useful for us to decide which parts we should concentrate on in the future. |
That's perfect, thanks for taking the time to respond! |
System Info
System:
OS: Linux 4.4 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
CPU: (24) x64 AMD Ryzen 9 5900X 12-Core Processor
Memory: 31.09 GB / 47.91 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 18.12.1 - /usr/local/node-version-manager/bin/node
Yarn: 1.22.19 - /usr/local/node-version-manager/bin/yarn
npm: 9.6.0 - /usr/local/node-version-manager/bin/npm
npmPackages:
@rspack/core: ^0.1.7 => 0.1.7
Details
When trying to use
rspack
programmatically via node and@rspack/core
- I have type errors due to missing internal dependencies.and so on
These type dependencies are marked as devDependencies in the package.json
However they are not marked as
dependencies
orpeerDependencies
of@rspack/core
- sotsc
failsI can add these dependencies to my application manually
Reproduce link
No response
Reproduce Steps
mkdir foobar
cd foobar
pnpm init
pnpm install --save typescript @rspack/core
echo "import * as rspack from '@rspack/core'" > main.ts
echo "console.log(rspack.rspack)" >> main.ts
npx tsc --outDir dist --module CommonJS --strict true --target ESNext main.ts
The text was updated successfully, but these errors were encountered: