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
The plugin should not override the value of noEmitOnError. This is the action currently suggested
If noEmitOnError is necessary to make watch mode work, then the plugin should print a warning when that flag is encountered in watch mode or it should be in screaming huge letters on the README along with an explanation as to why. It's not mentioned at all right now
Investigate if it's possible to make the plugin work in watch mode with either value of noEmitOnError. It's not clear to me why noEmitOnError: true breaks watch mode and if that's necessary and expected
noEmitOnError is expected behaviour for most people using the plugin outside of watch mode. They expect Rollup to fail rather than warn when type errors are encountered. We also mention that we default to true in the README. I'll change the default to false when in watch mode.
I tested noEmitOnError: false with standard building (i.e. without watching) and it still behaves as I'd expect and errors instead of warning. I'm not quite sure why we need to override what the user has in tsconfig.json for the standard case. Perhaps that behavior is different depending on the type of error? I had triggered it by just entering extra characters to create invalid syntax:
import App from './App.svelte';
const app = new App({
target: document.body,
props: {
name: 'world'
}asdsdf
});
export default app;
I think the behavior you suggested sounds reasonable enough though and will avoid the vast majority of users from hitting this issue
I see that we also override the defaults for module and skipLibCheck. I did not expect that would be happening and the behavior isn't documented. Would it be okay to remove all the defaults overrides or is there a reason the others are required? (It would obviously be a breaking change requiring a major version bump)
Activity
NotWoods commentedon Mar 19, 2020
Agreed, the program should also obey
noEmitOnErrorif specified in the tsconfig.shellscape commentedon Jul 9, 2020
@NotWoods I'm doing some housekeeping on old issues. Should we take this one up?
NotWoods commentedon Jul 9, 2020
I'll take this on.
benmccann commentedon Aug 16, 2020
I think there are multiple things we can do here:
noEmitOnError. This is the action currently suggestednoEmitOnErroris necessary to make watch mode work, then the plugin should print a warning when that flag is encountered in watch mode or it should be in screaming huge letters on the README along with an explanation as to why. It's not mentioned at all right nownoEmitOnError. It's not clear to me whynoEmitOnError: truebreaks watch mode and if that's necessary and expectedNotWoods commentedon Aug 16, 2020
noEmitOnErroris expected behaviour for most people using the plugin outside of watch mode. They expect Rollup to fail rather than warn when type errors are encountered. We also mention that we default totruein the README. I'll change the default tofalsewhen in watch mode.benmccann commentedon Aug 16, 2020
I tested
noEmitOnError: falsewith standard building (i.e. without watching) and it still behaves as I'd expect and errors instead of warning. I'm not quite sure why we need to override what the user has intsconfig.jsonfor the standard case. Perhaps that behavior is different depending on the type of error? I had triggered it by just entering extra characters to create invalid syntax:I think the behavior you suggested sounds reasonable enough though and will avoid the vast majority of users from hitting this issue
benmccann commentedon Aug 21, 2020
I see that we also override the defaults for
moduleandskipLibCheck. I did not expect that would be happening and the behavior isn't documented. Would it be okay to remove all the defaults overrides or is there a reason the others are required? (It would obviously be a breaking change requiring a major version bump)plugins/packages/typescript/src/options/interfaces.ts
Line 9 in 9af578c
work around rollup typescript crashing on error
benmccann commentedon Sep 9, 2020
PR submitted for this in #544
shellscape commentedon Sep 9, 2020
Aye I think we'll close this one.