handypack
v1.4.2
Published
A simple configuration build tool for webpack.
Downloads
1
Maintainers
Readme
handypack
A simple configuration build tool for webpack.
Install
npm i @forgleaner/handypack -D
Usage
const Path = require('path');
const { CreateWebpackConfig } = require('handypack');
const rootPath = Path.join(__dirname);
const srcPath = Path.join(rootPath, 'src');
const outputPath = Path.join(rootPath, 'dist');
const webpackConfig = CreateWebpackConfig({
mode: process.env.NODE_ENV,
context: srcPath,
entry: {
main: Path.join(srcPath, 'entry1.js')
},
output: {
path: outputPath
},
plugin: {
HtmlWebpackPlugin: {
template: Path.join(srcPath, 'index.html'),
filename: Path.join(outputPath, 'index.html')
}
}
});
module.exports = webpackConfig;