@phylum/webpack

Webpack integration

Usage no npm install needed!

<script type="module">
  import phylumWebpack from 'https://cdn.skypack.dev/@phylum/webpack';
</script>

README

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);
    }
});