We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It generates
yarn run v1.17.3 $ /home/charlike/github/tunnckoCore/opensource/node_modules/.bin/ncc build src/index.ts ncc: Version 0.20.5 ncc: Compiling file index.js ncc: Using [email protected] (local user-provided) 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/test/index.d.ts 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/test/index.d.ts.map 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/utils.d.ts.map 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/index.d.ts 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/index.d.ts.map 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/plugins/props.d.ts.map 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/plugins/params.d.ts 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/plugins/params.d.ts.map 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/plugins/initial.d.ts 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/plugins/initial.d.ts.map 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/plugins/body.d.ts 0kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/plugins/body.d.ts.map 1kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/utils.d.ts 1kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/types.d.ts 1kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/types.d.ts.map 1kB dist/home/charlike/github/tunnckoCore/opensource/packages/parse-function/dist/typings/src/plugins/props.d.ts 346kB dist/index.js 350kB [5235ms] - ncc 0.20.5 Done in 5.52s.
The tsconfig inside the package root is
{ "$schema": "http://json.schemastore.org/tsconfig", "compilerOptions": { "declarationDir": "./dist/typings", "typeRoots": [ "./node_modules/@types", "../../node_modules/@types", "../../@types" ], "skipLibCheck": true, "alwaysStrict": true, "newLine": "LF", "declaration": true, "declarationMap": true, "esModuleInterop": true, "experimentalDecorators": true, "emitDecoratorMetadata": false, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, "importHelpers": true, "incremental": false, "jsx": "react", "lib": ["dom", "esnext"], "module": "esnext", "moduleResolution": "node", // "noEmit": true, "strict": true, "sourceMap": true, "stripInternal": true, "noUnusedLocals": true, "noImplicitReturns": true, "resolveJsonModule": true, "noUnusedParameters": true, "target": "esnext", "rootDir": "src", "outDir": "dist", "baseUrl": "." }, "exclude": ["test"] }
With the tsc it is correct ./dist/typings
tsc
./dist/typings
The current workaround is
{ "scripts": { "prebuild": "rm -rf dist", "build": "ncc build src/index.ts -sm -o dist/main", "postbuild": "mv \"dist/main/$PWD/dist/typings\" dist && rm -rf dist/main/home" } }
The text was updated successfully, but these errors were encountered:
I found a way to avoid it by chance. Just use / not ./.
/
./
Example:
{ "compilerOptions": { "declaration": true, "declarationDir": "/typings" } }
Env:
{ "devDependencies": { "@zeit/ncc": "^0.22.3", "typescript": "^3.9.5" } }
Sorry, something went wrong.
Thanks, I'll try it some time.
fix: correct declaration output dir (#627)
d175973
If declarationDir is special, the output dir will be unexpected, fixes #481, and I run typescript example will cause same error as follow ![image](https://user-images.githubusercontent.com/32335736/102162314-ec5d1480-3ec3-11eb-91e5-b45afab4211c.png) `tsconfig.json` as follow ![image](https://user-images.githubusercontent.com/32335736/102162468-334b0a00-3ec4-11eb-835a-789bff388307.png) I give a quick fix, rewrite dir before write file into disk, seems can fix the problem.
Successfully merging a pull request may close this issue.
It generates
The tsconfig inside the package root is
With the
tsc
it is correct./dist/typings
The current workaround is
The text was updated successfully, but these errors were encountered: