Following a discusion from #5420.
It would be usefull to provide an alternative configuration based on the path of the file being transpiled.
In the following example, only the main.js file would be using the add-module-exports plugin. The es2015 presets in used on all files.
{
presets: ['es2015'],
files: {
"./main.js": {
plugins: ['add-module-exports'],
},
}
}
We should also be able to provide globs as path:
{
presets: ['es2015'],
files: {
"./*.js": {
plugins: ['transform-remove-console'],
},
}
}
Following a discusion from #5420.
It would be usefull to provide an alternative configuration based on the path of the file being transpiled.
In the following example, only the
main.jsfile would be using theadd-module-exportsplugin. The es2015 presets in used on all files.We should also be able to provide globs as path: