rollup-plugin-typescript2
rollup-plugin-typescript2 copied to clipboard
If an object is supplied as `tsconfig`, use that rather than a file
Allow users to specify the tsconfig configuration inline in the rollup plugin configuration
rollup.config.js
plugins: [
typescript({
tsconfig: {
compilerOptions: {...etc}
}
})
]
You can achieve almost the same result using tsconfigDefaults and tsconfigOverride options, see readme.
Because of the deep merge strategy, I'm unable to omit a path without creating a new tsconfig.json
You could create a new tsconfig file and set its path in tsconfig option (lets you set a custom tsconfig path/name). Either leave it empty and set other options in tsconfigOverride or just set the options there directly.
Currently I'm loading the users tsconfig with require(), making my changes and then storing the modified version in the .cache directory.
This works but is kinda gross
Yeah, I'll eventually look at doing shallow merge where appropriate, but that's something that will need maintenance going forward (in case of tsconfig format changes)
Hi folks, just doing some housekeeping in the issues. I'm going to close this one out as it's gone quite stale (no comments in 2.5+ years) and has no upvotes, so it doesn't seem to be a popular feature to implement and maintain (note that this is a volunteer, unpaid project). There are also various workaround available for this, so those may be better suited to solve this given the lack of popularity.
tsc also requires a tsconfig.json so we don't want to stray too far from that either.
With regard to shallow merging, that is a separate issue, and a bug that needs to be fixed in a breaking change eventually. Please see #86 for that.