Using babel 7 and webpack 4, the excludes defined for babel-loader already filter out files before running them through this plugin. However, the plugin does not honor that and instead uses its own exclude option.
[
'js-logger',
{
// TODO: The next line should not be needed, but because of this bug, all node-modules are excluded instead of honoring the exclusions defined for the babel-loader
exclude: [/node_modules\/(?!(some-module-that-needs-logger)\/).*/],
format: {
// some js-logger config
},
},
],
Basically with the latest babel and webpack, the exclusion checking code in this plugin can be removed. Maybe it wasn't needed in the first place, but I don't know.
Using babel 7 and webpack 4, the excludes defined for babel-loader already filter out files before running them through this plugin. However, the plugin does not honor that and instead uses its own
exclude
option.My example webpack rule:
My babel.config.js plugin
Basically with the latest babel and webpack, the exclusion checking code in this plugin can be removed. Maybe it wasn't needed in the first place, but I don't know.