-
Notifications
You must be signed in to change notification settings - Fork 808
fix ts sourceMap warning on prod build #241
base: master
Are you sure you want to change the base?
Conversation
Thanks, but this is the wrong fix, since this means there's not generation of source maps in dev mode anymore, where you arguably need them more. The right fix (I think, haven't tested it) would be to set this line to |
you are indeed right, I changed my Pull request to With that it is fixed |
Question remains if that is a desired default. I'd say yes because source maps are not of much use in production usually, but it is definetly a change other maintainers need to approve on. @Conduitry @antony thoughts? |
Disabling prod sourcemaps by default for the sake of this warning seems wrong. Regardless of whether we want to have them by default, if someone reenabled them, they'd be again faced with this warning. What does this warning actually indicate? Is there something wrong with the produced sourcemaps? Is there some other setting that needs to be enabled? |
The warning is a result of sourcemaps being disabled for TypeScript, while being enabled for Rollup as a whole. That's a mismatch and therefore it prints a warning - but it's not more than that, it will bundle. I think it would be nice to align the TS config for sourcemaps with that of the general rollup config though. So the alternative would be to set all these to |
Right, it'll bundle, but if TS sourcemaps are disabled, do the final sourcemaps only point back to the JS versions of everything? That seems like the real issue that should be addressed that the warning is telling us about. Setting it to true in tsconfig.json sounds reasonable. If we do want to make it dynamic at the TS step, can we pass in tsconfig overrides to the preprocessor and to the TypeScript compiler? |
@Conduitry @dummdidumm How can I support here? |
I currently lean towards replacing all |
This PR will change the following config
It will remove the negation on sourceMap and removes the following warning:
(!) Plugin typescript: @rollup/plugin-typescript: Typescript 'sourceMap' compiler option must be set to generate source maps.
Fixes #174