You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(fix): declaration maps should have correct sources
- previously, declarationDir was set to cwd if useTsconfigDeclarationDir
wasn't true, however, declarations aren't output to cwd, but to
Rollup's output destination, so this was incorrect
- instead, don't set declarationDir, which defaults it to outDir,
which is currently set to a placeholder
- currently rewrites declarations to output to Rollup's dest from
cwd, rewrite from outDir placeholder instead
- and add a rewrite of sources to match relative path from Rollup's
output dest instead of outDir placeholder
- also change the one line in the docs that says it'll be
`process.cwd()`; every other reference says it'll be the output dest
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ The plugin inherits all compiler options and file lists from your `tsconfig.json
46
46
*`noEmit`: false
47
47
*`inlineSourceMap`: false (see [#71](https://github.com/ezolenko/rollup-plugin-typescript2/issues/71))
48
48
*`outDir`: `./placeholder` in cache root, see [83](https://github.com/ezolenko/rollup-plugin-typescript2/issues/83) and [Microsoft/TypeScript/issues/24715](https://github.com/Microsoft/TypeScript/issues/24715)
49
-
*`declarationDir`: `process.cwd()` (*only if `useTsconfigDeclarationDir` is false in the plugin options*)
49
+
*`declarationDir`: Rollup's `output.file` or `output.dir` (*only if `useTsconfigDeclarationDir` is false in the plugin options*)
50
50
*`moduleResolution`: `node` (*`classic` is [deprecated](https://www.typescriptlang.org/docs/handbook/module-resolution.html). It also breaks this plugin, see [#12](https://github.com/ezolenko/rollup-plugin-typescript2/issues/12) and [#14](https://github.com/ezolenko/rollup-plugin-typescript2/issues/14)*)
51
51
*`allowNonTsExtensions`: true to let other plugins on the chain generate typescript, update plugin's include filter to pick them up (see [#111](https://github.com/ezolenko/rollup-plugin-typescript2/issues/111))
0 commit comments