For example we don't use TS at the beginning and @zero-scripts/plugin-webpack-babel will generate babel.config.js with support for JS files. But then we started using TypeScript and our current babel.config.js cannot handle TS files.
As a current behaviour after adding TypeScript and creating tsconfig.json developer should delete generated babel.config.js and then this file will be generated again with added plugins/presets. It's slightly weird because config sync feature was added to allow developer to make additional changes with ease and without learning Zero Scripts plugins custom options.
As a solution we should remember all user additions or deletions in configuration and then regenerate this configuration with actual support for TypeScript and with this changes.
Other solution can be to put all conditional configuration parts in config itself, but it will increase configuration size and decrease readability,
For example we don't use TS at the beginning and
@zero-scripts/plugin-webpack-babel
will generatebabel.config.js
with support for JS files. But then we started using TypeScript and our currentbabel.config.js
cannot handle TS files.As a current behaviour after adding TypeScript and creating
tsconfig.json
developer should delete generatedbabel.config.js
and then this file will be generated again with added plugins/presets. It's slightly weird because config sync feature was added to allow developer to make additional changes with ease and without learning Zero Scripts plugins custom options.As a solution we should remember all user additions or deletions in configuration and then regenerate this configuration with actual support for TypeScript and with this changes.
Other solution can be to put all conditional configuration parts in config itself, but it will increase configuration size and decrease readability,