@reactway/webpack-builder-plugin-write-file
TypeScript icon, indicating that this package has built-in type declarations

2.0.4 • Public • Published

@reactway/webpack-builder-plugin-write-file

A plugin made for webpack-builder.

Getting started

$ npm i @reactway/webpack-builder-plugin-write-file

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

const webpackBuilder = require("@reactway/webpack-builder");
const writeFile = require("@reactway/webpack-builder-plugin-write-file");

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

Passing options

It is wrapped write-file-webpack-plugin. All options you can pass from the wrapped package. Available options you can check at write-file-webpack-plugin-options

interface WriteFilePluginOptions {
    [key: string]: any;
}
const webpackBuilder = require("@reactway/webpack-builder");
const writeFile = require("@reactway/webpack-builder-plugin-write-file");

module.exports = new webpackBuilder.Builder(__dirname, {
    entry: "./src/app.js",
    output: {
        path: "./dist",
        filename: "[name].bundle.js"
    }
})
    .use(writeFile, {
        test: /\.css$/,
        useHashIndex: true
    })
    .toConfig();

Documentation

WIP

License

Released under the MIT license.

/@reactway/webpack-builder-plugin-write-file/

    Package Sidebar

    Install

    npm i @reactway/webpack-builder-plugin-write-file

    Weekly Downloads

    1

    Version

    2.0.4

    License

    MIT

    Unpacked Size

    6.89 kB

    Total Files

    7

    Last publish

    Collaborators

    • martynas-zilinskas
    • quatrodev
    • reactway-dev