How to use the google-closure-compiler-js.webpack function in google-closure-compiler-js

To help you get started, we’ve selected a few google-closure-compiler-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rochars / wavefile / webpack.config.js View on Github external
/*
 * https://github.com/rochars/wavefile
 * Copyright (c) 2017-2018 Rafael da Silva Rocha.
 */

/**
 * @fileoverview webpack configuration file.
 * Three dist files are created:
 * - wavefile.cjs.js, CommonJS dist for Node. No dependencies included.
 * - wavefile.umd.js, UMD with dependencies included.
 * - wavefile.min.js, Compiled for browsers. All dependencies included.
 */

const ClosureCompiler = require('google-closure-compiler-js').webpack;

module.exports = [
  // CommonJS dist, no dependencies in the bundle.
  // Will be the one in the "main" field of package.json.
  {
    target: 'node',
    entry: './index.js',
    output: {
      filename: './dist/wavefile.cjs.js',
      libraryTarget: "commonjs"
    },
    externals: {
      'byte-data': 'byte-data',
      "alawmulaw": "alawmulaw",
      "base64-arraybuffer": "base64-arraybuffer",
      "bitdepth": "bitdepth",

google-closure-compiler-js

Check, compile, optimize and compress Javascript with Closure-Compiler using Java

Apache-2.0
Latest version published 4 years ago

Package Health Score

67 / 100
Full package analysis