-
-
Notifications
You must be signed in to change notification settings - Fork 179
fix(index): exclude is ignored (options.exclude
)
#164
fix(index): exclude is ignored (options.exclude
)
#164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
options.exclude
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thx awesome 👍 this was one of the blockers to update uglify
for webpack
v4.0.0
This fix doesn't seem to work for me. Could it be that it is because the file I wish to exclude is in |
@everdimension can you provide configuration? |
Well I wished I wouldn't have to make a demo repo :) But I can try later today. But in short for now here's part of my module: {
rules: [
/** ...other rules... */
{
test: /\.js$/,
use: [
{
loader: 'babel-loader',
},
],
include: path.resolve(__dirname, 'src'),
},
],
} Here are uglifyjsplugin options: new UglifyJSPlugin({
exclude: /ReactChartIQ\.translations.*\.js$/i,
uglifyOptions: {
ie8: false,
warnings: false,
sourceMap: true
},
}) These work in |
@everdimension strange, minimum test repo will be very helpful |
I think think the issue is that the plugin processes output files not input files. I'm not sure about the beta, but this is the same behavior as @everdimension I'm not sure about your use case - but we have some legacy code that can't be minified, so the way we did it (with the current version of the plugin - |
@rszewczyk yes, you are right |
|
Yep, this 'only' excludes |
It's not a particular module, i'm trying to exclude a filename within a module |
|
What? I have a particular output file name. Otherwise it wouldn't have worked before either. |
A simple demo of the problem can be found here.
The expected behavior is that chunks with a filename that match the given pattern will be excluded from uglify. This was the behavior exhibited by 0.4.6. The actual behavior is that all chunks are uglified.
It looks like the problem is that the options used to filter what chunks are processed, do not include the exclude configuration passed to the plugin constructor.