@pixi/webworker-plugins

0.3.0 • Public • Published

@pixi/webworker-plugins

npm version

Plugins for Web Workers.

import FooWorker from 'worker:./foo.worker.ts';

Install

npm install @pixi/webworker-plugins --save-dev

@pixi/webworker-plugins/jest-transform

Jest transform for Web Workers.

Usage

Add the following code to your jest.config.js:

module.exports = {
    transform: {
        '\\.worker.ts$': '@pixi/webworker-plugins/lib/jest-transform',
    },
    moduleNameMapper: {
        '^worker:(.*)$': '$1',
    },
    // ...
};

@pixi/webworker-plugins/rollup-plugin

Rollup plugin for Web Workers.

Usage

Add the following code to your rollup.config.mjs:

import webworker from '@pixi/webworker-plugins/rollup-plugin';

export default {
    plugins: [
        webworker(),
    ],
    // ...
};

/@pixi/webworker-plugins/

    Package Sidebar

    Install

    npm i @pixi/webworker-plugins

    Weekly Downloads

    66

    Version

    0.3.0

    License

    MIT

    Unpacked Size

    27.5 kB

    Total Files

    23

    Last publish

    Collaborators

    • zyie
    • bigtimebuddy
    • supersodasea