-
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
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:
{
test: /\.js$/,
exclude: [/node_modules\/(?!(some-module-that-needs-logger)\/).*/],
use: [
{
loader: 'babel-loader',
},
],
},My babel.config.js plugin
[
'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.
Metadata
Metadata
Assignees
Labels
No labels