Clean up deprecation handling - #2076
Conversation
| format: 'es', | ||
| dest: '_actual/bundle1.js', | ||
| output: { | ||
| file: '_actual/bundle1.js', |
There was a problem hiding this comment.
Perhaps make this _actual/bundle2.js so that we are testing the precedence here for future changes too.
There was a problem hiding this comment.
With the current implementation, dest: bundle1.js would replace output.file: bundle2.js(as it is currently the case for all deprecations, i.e. the deprecated config takes precedence). I guess you would rather expectoutput.file` to win?
I could change that, but then I would try to change it for all deprecations at once. Should I do that?
There was a problem hiding this comment.
It does seem to make sense that the newer form should have higher precedence.
In theory it's a breaking change, but it could be worthwhile.
d9c20ed to
cc6bf5b
Compare
(but still display a warning)
|
@guybedford Updated to not overwrite existing options with deprecated ones. |
desttriggers error inoutput.formateven if it is specified #2005This resolves some issues surrounding deprecations and also fixes an outdated warning. Most notably, specifying
destwould overwrite any existingoutputobject even if it was created by previous deprecation warnings.Also, the
-dflag has now been deprecated.