Research
Security News
Malicious PyPI Package ‘pycord-self’ Targets Discord Developers with Token Theft and Backdoor Exploit
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
uglify-es-loader
Advanced tools
Uglify.js loader for webpack(fork from uglify-loader, using uglify-es@3)
Uglify loader for webpack(fork from uglify-loader, using uglify-es@3)
npm i -D uglify-es-loader
Webpack has UglifyJSPlugin that uglifies the output after bundling. In the applications that depend on thirdparty libraries you may want to uglify with mangling only your application code but not the code that you don't control.
Webpack 1
module: {
loaders: [
{
// I want to uglify with mangling only app files, not thirdparty libs
test: /.*\/app\/.*\.js$/,
exclude: /.spec.js/, // excluding .spec files
loader: "uglify"
}
]
}
You can pass UglifyJS parameters via 'uglify-es-loader' property of webpack config.
module: {
loaders: [
{
// I want to uglify with mangling only app files, not thirdparty libs
test: /.*\/app\/.*\.js$/,
exclude: /.spec.js/, // excluding .spec files
loader: "uglify"
}
]
},
'uglify-es-loader': {
mangle: false
}
Webpack 2
module: {
rules: [
{
// I want to uglify with mangling only app files, not thirdparty libs
test: /.*\/app\/.*\.js$/,
exclude: /.spec.js/, // excluding .spec files
use: 'uglify-es-loader'
}
]
}
You can pass UglifyJS parameters via loader options.
module: {
rules: [
{
// I want to uglify with mangling only app files, not thirdparty libs
test: /.*\/app\/.*\.js$/,
exclude: /.spec.js/, // excluding .spec files
use: {
loader: 'uglify-es-loader',
options: {
mangle: false
}
}
}
]
}
Enable sourceMap
{
loader: 'uglify-es-loader',
options: {
enableSourceMap: true
}
}
FAQs
Uglify.js loader for webpack(fork from uglify-loader, using terser@3)
We found that uglify-es-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.