javascript-obfuscator / webpack-obfuscator

javascript-obfuscator plugin for Webpack
https://github.com/javascript-obfuscator/javascript-obfuscator
BSD 2-Clause "Simplified" License
870 stars 82 forks source link

Is it possible to add an 'includes' #84

Open k713927 opened 4 years ago

k713927 commented 4 years ago

now has excludes,if can add 'includes' is very good ,thank you ,and this plugin is very good

sanex3339 commented 4 years ago

excludes array uses minimatch under the hood. Try to use negate pattern with ! character.

This should exclude everything except some-file.js

['!/src/includes/some-file.js']
sanex3339 commented 4 years ago

Ping

kasparkallas commented 3 years ago

Does not seem to work for me using 2.6.0 and I can't upgrade atm because Vue CLI still uses Webpack 4. I resolved the inclusion issue by using a loader with a specific rule regex instead of the plugin.

witcsmartian commented 9 months ago

excludes array uses minimatch under the hood. Try to use negate pattern with ! character.

This should exclude everything except some-file.js

['!/src/includes/some-file.js']

this is wrong,the correct config:

['**', '!/src/includes/some-file.js']