@phylum/webpack
v4.0.3
Published
Webpack integration
Downloads
6
Readme
PhlumJS + Webpack
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);
}
});