Security News
CISA Brings KEV Data to GitHub
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
uglify-es-loader
Advanced tools
Uglify.js loader for webpack(fork from uglify-es-loader, using uglify-es@3)
Uglify loader for webpack(fork from uglify-es-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)
The npm package uglify-es-loader receives a total of 2,306 weekly downloads. As such, uglify-es-loader popularity was classified as popular.
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.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.