3.2.14 • Published 28 days ago

dk-webpack-parallel-simple v3.2.14

Weekly downloads
-
License
MIT
Repository
github
Last release
28 days ago

Simple lib for parallel Webpack builds

coverage npm license

Motivation

The existing library parallel-webpack is not maintained, has huge codebase, does not support custom communication between processes, does not show low-level errors, requires separate file with configs.

This one is a light alternative based on internal Node.js child_process fork

Supports TypeScript configs

Usage

import { ChildProcess } from 'child_process';
import { run, TypeConfig } from 'dk-webpack-parallel-simple';

let childProcesses: Array<ChildProcess> = [];

const parallelConfig: TypeConfig = {
    onInit(processes: Array<ChildProcess>) { childProcesses = processes; },
    bailOnError: false,
    configPaths: [
        path.resolve(__dirname, './client.config'),
        path.resolve(__dirname, './server.config'),
    ],
    afterFirstBuild() {
        childProcesses.forEach((childProcess) => {
            childProcess.send('SOME_MESSAGE');
        });
        
        // ... maybe start Node.js server, browser reload service, file generation service
    },
};

run(parallelConfig);

Params

bailOnError - if true all processes will be terminated on the first error

configPaths - array of config files' paths

afterFirstBuild (optional) - callback that called after first compiler run on every config passed

onInit (optional) - passes instances of forked processes so you are able to send messages to your webpack processes and get answers

3.2.9

28 days ago

3.2.13

28 days ago

3.2.12

28 days ago

3.2.14

28 days ago

3.2.11

28 days ago

3.2.10

28 days ago

3.2.8

1 month ago

3.2.7

1 month ago

3.2.6

1 month ago

3.2.6-alpha.0

1 month ago

3.2.2

1 month ago

3.2.3

1 month ago

3.2.1

1 month ago

3.2.0

1 month ago

3.1.43

3 months ago

3.1.42

3 months ago

3.1.41

3 months ago

3.1.40

3 months ago

3.1.39

3 months ago

3.1.38

4 months ago

3.1.16

10 months ago

3.1.15

10 months ago

3.1.18

10 months ago

3.1.17

10 months ago

3.1.23

9 months ago

3.1.22

10 months ago

3.1.25

9 months ago

3.1.24

9 months ago

3.1.27

7 months ago

3.1.26

9 months ago

3.1.29

7 months ago

3.1.28

7 months ago

3.1.21

10 months ago

3.1.20

10 months ago

3.1.19

10 months ago

3.1.34

6 months ago

3.1.33

6 months ago

3.1.36

5 months ago

3.1.35

6 months ago

3.1.37

5 months ago

3.1.30

7 months ago

3.1.32

6 months ago

3.1.31

6 months ago

3.1.12

11 months ago

3.1.11

11 months ago

3.1.14

11 months ago

3.1.13

11 months ago

3.1.9

11 months ago

3.1.8

11 months ago

3.0.4

11 months ago

3.1.2

11 months ago

3.0.13

11 months ago

3.1.1

11 months ago

3.0.10

11 months ago

3.1.0

11 months ago

3.0.11

11 months ago

3.1.7

11 months ago

3.0.16

11 months ago

3.0.8

11 months ago

3.1.6

11 months ago

3.0.17

11 months ago

3.0.7

11 months ago

3.1.5

11 months ago

3.0.14

11 months ago

3.0.6

11 months ago

3.1.4

11 months ago

3.0.15

11 months ago

3.0.18

11 months ago

3.0.19

11 months ago

3.0.9

11 months ago

2.1.5

2 years ago