mirror of
https://github.com/pnpm/pnpm.git
synced 2026-04-11 10:40:53 -04:00
* build: enable TypeScript `verbatimModuleSyntax`
* fix: use `import type` to elide import errors during bundling
```
> pnpm dlx node@runtime:24.6.0 bundle.ts
Error: R] Could not resolve "@npm/types"
../pkg-manifest/exportable-manifest/lib/transform/index.js:1:15:
1 │ import {} from '@npm/types';
╵ ~~~~~~~~~~~~
You can mark the path "@npm/types" as external to exclude it from the bundle, which will remove this error and leave the unresolved path in the bundle.
Error: Build failed with 1 error:
../pkg-manifest/exportable-manifest/lib/transform/index.js:1:15: ERROR: Could not resolve "@npm/types"
at failureErrorWithLog (/home/runner/work/pnpm/pnpm/node_modules/.pnpm/esbuild@0.25.12/node_modules/esbuild/lib/main.js:1467:15)
```
* fix: use `import type` to elide import errors in tests
23 lines
508 B
JSON
23 lines
508 B
JSON
{
|
|
"compilerOptions": {
|
|
"allowSyntheticDefaultImports": true,
|
|
"composite": true,
|
|
"declaration": true,
|
|
"erasableSyntaxOnly": true,
|
|
"esModuleInterop": true,
|
|
"module": "nodenext",
|
|
"moduleResolution": "nodenext",
|
|
"noImplicitAny": true,
|
|
"noImplicitReturns": true,
|
|
"preserveConstEnums": true,
|
|
"removeComments": false,
|
|
"sourceMap": true,
|
|
"strict": true,
|
|
"target": "es2022",
|
|
"verbatimModuleSyntax": true
|
|
},
|
|
"atom": {
|
|
"rewriteTsconfig": true
|
|
}
|
|
}
|