4.0.3 • Published 5 years ago

@phylum/webpack v4.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

PhlumJS + Webpack

Build Status Coverage Status Latest License

Installation

npm i @phylum/webpack webpack

Usage

import { Task } from '@phylum/pipeline';
import { WebpackTask } from '@phylum/webpack';

const config = Task.value({
	// ...webpack config...
});

const bundle = new WebpackTask(config);

Output

The task will output stats from the latest compilation and will only reject in case of critical errors.

new Task(async t => {
	const stats = await t.use(bundle);
	const data = stats.toJson();
	for (const msg of data.warnings) {
		console.warn(msg);
	}
	for (const msg of data.errors) {
		console.error(msg);
	}
});