lazy-compile-webpack-plugin

Lazy compile dynamic imports to boost your webpack startup time.


Keywords
webpack, plugin, lazy-compile-webpack-plugin, lazy, compile, dynamic, import, imports
License
MIT
Install
npm install lazy-compile-webpack-plugin@0.1.7

Documentation

Lazy Compile Webpack Plugin

Plugin that saves a tremendous amount of time.

Why

Starting the development server is taking you a long time when the codebase is large. You have tried dynamic imports, it only does a load-on-demand, the whole project was still been compiled. We don't want to wait a couple of minutes for a simple modification. People don't waste time for the things they have never used!

Install

  npm i --save-dev lazy-compile-webpack-plugin
  yarn add --dev lazy-compile-webpack-plugin

Usage

const LazyCompilePlugin = require('lazy-compile-webpack-plugin');

module.exports = {
  entry: 'index.js',
  output: {
    path: __dirname + '/dist',
    filename: 'bundle.js',
  },
  plugins: [new LazyCompilePlugin()],
};

Options

Name Type Default Description
refreshAfterCompile boolean false Enable/Disable page refresh when compilation is finish

refreshAfterCompile

Type: boolean Default: false

Set false for a seamless dev experience.