All Projects → roman01la → Webpack Closure Compiler

roman01la / Webpack Closure Compiler

Licence: mit
[DEPRECATED] Google Closure Compiler plugin for Webpack

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Webpack Closure Compiler

Serverless Plugin Webpack
Serverless Plugin Webpack
Stars: ✭ 72 (-84.58%)
Mutual labels:  tree-shaking, optimization
Geneticalgorithmpython
Source code of PyGAD, a Python 3 library for building the genetic algorithm and training machine learning algorithms (Keras & PyTorch).
Stars: ✭ 435 (-6.85%)
Mutual labels:  optimization
Awesome Wp Speed Up
Plugins and resources to speed up and optimize your WordPress site.
Stars: ✭ 375 (-19.7%)
Mutual labels:  optimization
Als Community
Replicated and optimized community version of Advanced Locomotion System V4 for Unreal Engine 4.26 with additional bug fixes.
Stars: ✭ 389 (-16.7%)
Mutual labels:  optimization
Clean Css
Fast and efficient CSS optimizer for node.js and the Web
Stars: ✭ 3,863 (+727.19%)
Mutual labels:  optimization
Optim
OptimLib: a lightweight C++ library of numerical optimization methods for nonlinear functions
Stars: ✭ 411 (-11.99%)
Mutual labels:  optimization
Ifopt
An Eigen-based, light-weight C++ Interface to Nonlinear Programming Solvers (Ipopt, Snopt)
Stars: ✭ 372 (-20.34%)
Mutual labels:  optimization
Qpth
A fast and differentiable QP solver for PyTorch.
Stars: ✭ 461 (-1.28%)
Mutual labels:  optimization
Ensmallen
A header-only C++ library for numerical optimization --
Stars: ✭ 436 (-6.64%)
Mutual labels:  optimization
Closure Webpack Plugin
Webpack Google Closure Compiler and Closure Library plugin -
Stars: ✭ 392 (-16.06%)
Mutual labels:  optimization
Tinyify
a browserify plugin that runs various optimizations, so you don't have to install them all manually. makes your bundles tiny!
Stars: ✭ 392 (-16.06%)
Mutual labels:  tree-shaking
Opytimizer
🐦 Opytimizer is a Python library consisting of meta-heuristic optimization techniques.
Stars: ✭ 387 (-17.13%)
Mutual labels:  optimization
Spot mini mini
Dynamics and Domain Randomized Gait Modulation with Bezier Curves for Sim-to-Real Legged Locomotion.
Stars: ✭ 426 (-8.78%)
Mutual labels:  optimization
Blackbox
A Python module for parallel optimization of expensive black-box functions
Stars: ✭ 378 (-19.06%)
Mutual labels:  optimization
Teaching
Teaching Materials for Dr. Waleed A. Yousef
Stars: ✭ 435 (-6.85%)
Mutual labels:  optimization
Simplify
Android virtual machine and deobfuscator
Stars: ✭ 3,865 (+727.62%)
Mutual labels:  optimization
Pandapower
Convenient Power System Modelling and Analysis based on PYPOWER and pandas
Stars: ✭ 387 (-17.13%)
Mutual labels:  optimization
Gentoolto
A Gentoo Portage configuration for building with -O3, Graphite, and LTO optimizations
Stars: ✭ 399 (-14.56%)
Mutual labels:  optimization
Winapp2
A database of extended cleaning routines for popular Windows PC based maintenance software.
Stars: ✭ 463 (-0.86%)
Mutual labels:  optimization
Simple
Experimental Global Optimization Algorithm
Stars: ✭ 450 (-3.64%)
Mutual labels:  optimization

[DEPRECATED]

This project is deprecated in favor of official Webpack plugin webpack-contrib/closure-webpack-plugin

webpack-closure-compiler

Google Closure Compiler plugin for Webpack

Webpack Closure Compiler Plugin

Table of Contents

Why use Closure Compiler instead of UglifyJS?

Closure Compiler is the most advanced JavaScript optimization tool. It generates smallest bundle and emits efficient JavaScript code by doing whole program analysis and optimization, removing closures and inlining function calls, as well as tree-shaking for AMD, CommonJS and ES2015 modules.

Installation

npm i -D webpack-closure-compiler

Requirements

While there's JavaScript version of Closure Compiler, the original compiler is written in Java and thus Java version is more complete and performs better in terms of JavaScript code optimizations and compilation speed. If you want to use Java-based compiler, make sure you have installed Java SDK.

Usage

Options

compiler: <Object>

A hash of options to pass to google-closure-compiler.

You can optionally specify a path to your own version of the compiler.jar if the version provided by the plugin isn't working for you. See example below for optional parameter.

jsCompiler: <Boolean>

Use pure JavaScript version of Closure Compiler (no Java dependency). Note that compilation time will be around 2x slower. Default is false. concurrency and jsCompiler options are mutually exclusive.

concurrency: <Number>

The maximum number of compiler instances to run in parallel, defaults to 1. concurrency and jsCompiler options are mutually exclusive.

test: <RegExp>

Process only files which filename satisfies specified RegExp, defaults to /\.js($|\?)/i.

Example

const path = require('path');
const ClosureCompilerPlugin = require('webpack-closure-compiler');

module.exports = {
    entry: [
        path.join(__dirname, 'app.js')
    ],
    output: {
        path: path.join(__dirname, '/'),
        filename: 'app.min.js'
    },
    plugins: [
        new ClosureCompilerPlugin({
          compiler: {
            jar: 'path/to/your/custom/compiler.jar', //optional
            language_in: 'ECMASCRIPT6',
            language_out: 'ECMASCRIPT5',
            compilation_level: 'ADVANCED'
          },
          concurrency: 3,
        })
    ]
};

Handbook

Read Closure Compiler Handbook to you understand how to use Closure Compiler and learn its features.

Contributing

If you've spotted a bug, please, open an issue, and after discussion submit a pull request with a bug fix. If you would like to add a feature or change existing behaviour, open an issue and tell about what exactly you want to change/add.

License

MIT

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].