All Projects → webpack-contrib → Babel Minify Webpack Plugin

webpack-contrib / Babel Minify Webpack Plugin

Licence: mit
[DEPRECATED] Babel Minify Webpack Plugin

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Babel Minify Webpack Plugin

Webpack Babel Multi Target Plugin
A Webpack plugin that works with Babel to allow differential loading - production deployment of ES2015 builds targeted to modern browsers, with an ES5 fallback for legacy browsers.
Stars: ✭ 150 (-70.12%)
Mutual labels:  webpack, webpack-plugin, babel
Webpack Core Usage
webpack2完整系列课程,欢迎阅读。同时欢迎移步我的react全家桶文章全集: https://github.com/liangklfangl/react-article-bucket
Stars: ✭ 94 (-81.27%)
Mutual labels:  webpack, webpack-plugin, babel
Offline Plugin
Offline plugin (ServiceWorker, AppCache) for webpack (https://webpack.js.org/)
Stars: ✭ 4,444 (+785.26%)
Mutual labels:  webpack, webpack-plugin
Webbf
Java Web工程demo 后端:spring + spring mvc + mybatis + maven,涉及定时任务quartz、ehcache缓存、RESTful API、邮件发送... 前端:react + reflux + webpack,涉及ES6、jquery、react-router、ant design等内容, 提供下思路,仅供参考。
Stars: ✭ 367 (-26.89%)
Mutual labels:  webpack, babel
Angular2 Babel Esnext Starter
Angular development and testing examples with Babel in Javascript (ES6/ES7).
Stars: ✭ 497 (-1%)
Mutual labels:  webpack, babel
Browser Sync Webpack Plugin
Easily use BrowserSync in your Webpack project.
Stars: ✭ 356 (-29.08%)
Mutual labels:  webpack, webpack-plugin
Webpack Chrome Extension Reloader
🔥 Hot reloading while developing Chrome extensions with webpack 🔥
Stars: ✭ 365 (-27.29%)
Mutual labels:  webpack, webpack-plugin
Sku
Front-end development toolkit
Stars: ✭ 403 (-19.72%)
Mutual labels:  webpack, babel
Server Side Rendering
Interactive guide to server-side rendering with Webpack, React, React Transmit, CSS modules and more
Stars: ✭ 352 (-29.88%)
Mutual labels:  webpack, babel
Babel Loader
📦 Babel loader for webpack
Stars: ✭ 4,570 (+810.36%)
Mutual labels:  webpack, babel
React
React+webpack+redux+ant design+axios+less全家桶后台管理框架
Stars: ✭ 4,414 (+779.28%)
Mutual labels:  webpack, babel
Backpack
🎒 Backpack is a minimalistic build system for Node.js projects.
Stars: ✭ 4,466 (+789.64%)
Mutual labels:  webpack, babel
Webpack Extension Reloader
A upgrade from 🔥webpack-chrome-extension-reloader🔥, now on all browsers
Stars: ✭ 355 (-29.28%)
Mutual labels:  webpack, webpack-plugin
Js Library Boilerplate Basic
Javascript Minimal Starter Boilerplate - Webpack 5 🚀, Babel 7, UMD, Unit Testing
Stars: ✭ 354 (-29.48%)
Mutual labels:  webpack, babel
Wxapp Boilerplate
使用 webpack, babel, scss 开发的微信/支付宝小程序项目脚手架
Stars: ✭ 367 (-26.89%)
Mutual labels:  webpack, babel
Pwa
An opinionated progressive web app boilerplate
Stars: ✭ 353 (-29.68%)
Mutual labels:  webpack, babel
Moment Locales Webpack Plugin
Easily remove unused Moment.js locales with webpack
Stars: ✭ 396 (-21.12%)
Mutual labels:  webpack, webpack-plugin
Webpack Parallel Uglify Plugin
A faster uglifyjs plugin.
Stars: ✭ 456 (-9.16%)
Mutual labels:  webpack, webpack-plugin
Gulp Scss Starter
Frontend development with pleasure. SCSS version
Stars: ✭ 339 (-32.47%)
Mutual labels:  webpack, babel
Woo Next
🚀 React WooCommerce theme, built with Next JS, Webpack, Babel, Node, Express, using GraphQL and Apollo Client
Stars: ✭ 342 (-31.87%)
Mutual labels:  webpack, babel

DEPREACTED due to lack of support/bug fixes/ new features, project abandoned, please migrate on https://github.com/webpack-contrib/terser-webpack-plugin


npm deps test coverage quality chat

Babel Minify Webpack Plugin

A Webpack Plugin for babel-minify - A babel based minifier

Install

npm install babel-minify-webpack-plugin --save-dev

Usage

// webpack.config.js
const MinifyPlugin = require("babel-minify-webpack-plugin");
module.exports = {
  entry: //...,
  output: //...,
  plugins: [
    new MinifyPlugin(minifyOpts, pluginOpts)
  ]
}

Options

minifyOpts

minifyOpts are passed on to babel-preset-minify. You can find a list of all available options in the package directory.

Default: {}

pluginOpts

  • test: Test to match files against. Default: /\.js($|\?)/i
  • include: Files to include. Default: undefined
  • exclude: Files to exclude. Default: undefined
  • comments: Preserve Comments. Default: /^\**!|@preserve|@license|@cc_on/, falsy value to remove all comments. Accepts function, object with property test (regex), and values.
  • sourceMap: Configure a sourcemap style. Default: webpackConfig.devtool
  • parserOpts: Configure babel with special parser options.
  • babel: Pass in a custom babel-core instead. Default: require("babel-core")
  • minifyPreset: Pass in a custom babel-minify preset instead. Default: require("babel-preset-minify")

Why

You can also use babel-loader for webpack and include minify as a preset and should be much faster than using this - as babel-minify will operate on smaller file sizes. But then, why does this plugin exist at all? -

  • A webpack loader operates on single files and the minify preset as a webpack loader is going to consider each file to be executed directly in the browser global scope (by default) and will not optimize some things in the toplevel scope. To enable optimizations to take place in the top level scope of the file, use mangle: { topLevel: true } in minifyOptions.
  • When you exclude node_modules from being run through the babel-loader, babel-minify optimizations are not applied to the excluded files as it doesn't pass through the minifier.
  • When you use the babel-loader with webpack, the code generated by webpack for the module system doesn't go through the loader and is not optimized by babel-minify.
  • A webpack plugin can operate on the entire chunk/bundle output and can optimize the whole bundle and you can see some differences in minified output. But this will be a lot slower as the file size is usually really huge. So there is another idea where we can apply some optimizations as a part of the loader and some optimizations in a plugin.

Maintainers

Boopathi Rajaa Juho Vepsäläinen Joshua Wiens Kees Kluskens Sean Larkin
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].