Socket
Book a DemoInstallSign in
Socket

@reactway/webpack-builder-plugin-images

Package Overview
Dependencies
Maintainers
3
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reactway/webpack-builder-plugin-images

A plugin made for webpack-builder.

latest
Source
npmnpm
Version
2.0.4
Version published
Maintainers
3
Created
Source

@reactway/webpack-builder-plugin-images

A plugin made for webpack-builder.

Getting started

$ npm i @reactway/webpack-builder-plugin-images

Add plugin into webpack config by using use() builder method.

const webpackBuilder = require("@reactway/webpack-builder");
const images = require("@reactway/webpack-builder-plugin-images");

module.exports = new webpackBuilder.Builder(__dirname, {
    entry: "./src/app.js",
    output: {
        path: "./dist",
        filename: "[name].bundle.js"
    }
})
    .use(images)
    .toConfig();

Passing options

Options you can pass:

interface ImageLoaderOptions {
    limit: string | number;
    sourceMap: boolean;
    optimizeInDev: boolean;
    optimization: ImagesOptimization;
    outputFolder: string;
}

More details about @reactway/image-loader options you can read @reactway/image-loader options.

const webpackBuilder = require("@reactway/webpack-builder");
const images = require("@reactway/webpack-builder-plugin-images");

module.exports = new webpackBuilder.Builder(__dirname, {
    entry: "./src/app.js",
    output: {
        path: "./dist",
        filename: "[name].bundle.js"
    }
})
    .use(images, {
        limit:1000
        ...
    })
    .toConfig();

Documentation

WIP

License

Released under the MIT license.

Keywords

webpack

FAQs

Package last updated on 20 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts