1.0.2 • Published 3 months ago

@exact-realty/esbuild-plugin-closure-compiler v1.0.2

Weekly downloads
-
License
Apache-2.0 WITH L...
Repository
github
Last release
3 months ago

esbuild plugin for post-compiling with Google Closure Compiler

Reliability Rating Vulnerabilities Bugs Security Rating Maintainability Rating NPM Downloads

How to use

Installing

npm i -D @exact-realty/esbuild-plugin-closure-compiler

Configuring esbuild

In the file you have your configuration, first import this plugin

const cc = require('@exact-realty/esbuild-plugin-closure-compiler');

Or using ES module syntax:

import cc from '@exact-realty/esbuild-plugin-closure-compiler';

Then, in your esbuild configuration, add cc() to the plugins list. cc optionally takes an object that is passed as options to Closure Compiler (for reference, refer to the documentation for Google Closure Compiler). Minimal example:

const esbuild = require('esbuild');
const cc = require('@exact-realty/esbuild-plugin-closure-compiler');

await esbuild
	.build({
		entryPoints: ['index.js'],
		outdir: 'build',
		bundle: true,
		format: 'cjs',
		plugins: [cc({ language_out: 'ECMASCRIPT_2018' })],
	});
1.0.2

3 months ago

1.0.1

6 months ago

1.0.0

6 months ago