@reactway/webpack-builder-plugin-write-file
v2.0.4
Published
A plugin made for webpack-builder.
Downloads
15
Readme
@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.