Closed
Description
What problem does this feature solve?
I'm creating a standardised babel config in a preset. This config requires that different configuration is used depending on the process.env
options, in particular when Jest is running in test
mode.
api.extendPackage({
babel: {
ignore: process.env === "test" ? ["core-js/*"] : []
}
});
This results in
module.exports = {
presets: [
'@vue/app'
],
ignore: []
}
What does the proposed API look like?
I'm not sure. The generator script is evaluating the code when it is running, so I guess it would need to be a method similar to that but that takes a string to be evaluated.