static-webpack-plugin
v0.2.1
Published
A static-site generator powered by webpack.
Downloads
11
Readme
Static Webpack Plugin
Very simple static-site generator powered by webpack.
Install
$ npm install --save-dev static-webpack-plugin
Usage
webpack.config.js
var StaticWebpackPlugin = require('static-webpack-plugin');
module.exports = {
entry: {
'client': './client.js',
'static': './static.js'
},
output: {
path: './public',
filename: '[name].js',
libraryTarget: 'umd' /* IMPORTANT - must be requirable */
},
plugins: [new StaticWebpackPlugin('static.js')]
};
static.js
module.exports = function(render, done) {
render('index.html', '<html>Index</html>');
render('about/index.html', '<html>About</html>');
done();
};