Rollback #208: Reinstate rollup-plugin-typescript2 #287
Rollback #208: Reinstate rollup-plugin-typescript2 #287jaredpalmer merged 1 commit intojaredpalmer:masterfrom medelman17:fix/ts-plugin-rollback
rollup-plugin-typescript2 #287Conversation
|
Hmm. We specifically updated Redux Starter Kit to use 0.10.6 because it started correctly merging all our declarations into a single |
|
Yes, I believe so. The issue was that the rollup-plugin-ts really did not work as advertised and introduced more problematic and inconsistent bugs such as duplicative references directives and incorrect declarations. @markerikson why does merging declarations matter outside of aesthetics? |
|
I know @phryneas pointed out some issues where that might not work with certain Webpack setups, apparently. See reduxjs/redux-toolkit#212 (comment) for discussion. |
|
@medelman17 @markerikson FWIW, my OG formik rollup setup (pre-tsdx) didn't use |
No. At least for me. FYI @medelman17 Thought you might find this useful :) |
Merging declarations (and splitting them across rollup chunks, rewriting and tree-shaking them), something that rollup-plugin-typescript2 doesnt do and even tsc itself doesn't do, is non-trivial. I think it's a bit harsh to right out say it is not working as advertised 🙂. I'm putting a lot of effort into fixing whatever issues that remain with declaration bundling and am addressing the issues one at a time. Currently I'm addressing a lot of the recently discovered issues through this repo on a separate branch. It has been very helpful to get it into more developers hands so I can discover whatever bugs there are. |
|
Didn't mean to come off as rude, nor does this have anything to do with lack of effort. I understand that you're working through bugs, but until those are fixed, we need to ensure that the published version of tsdx still works in the interim. Looking forward to when the declaration merging is stuff is sorted out. It's very cool and exciting. |
|
I was betting it will conflict. 😆 The customBabelRollup plugin should be removed (entirely dropping But yea, I agree that we need to wait :) Need experimenting, definitely. |
|
@jaredpalmer : no, it looks like v0.11.0 is not combining types into a single I just tried updating Redux Starter Kit and rebuilding, and it's back to individual |
|
hm... so, what's the recommended approach then to introduce additional rollup plugins that contain async/await? |
As described in #200,
tsdxpreviously utilizedrollup-plugin-typescript2to compile and check TypeScript files. On account of the fact that the above plugin cannot be used alongside other rollup plugins that contain async/await syntax without a workaround,tsdxmigrated to@wessberg/rollup-plugin-tsin #208. However, as discussed in #268, #274, #285 and elsewhere, the above migration caused untoward consequences in certain instances for existingtsdxusers with custombabelsetups.This PR reverts support
@wessberg/rollup-plugin-tsand restoresrollup-plugin-typescript2as compiler in chief.Closes #268, #274, #285