0.2.1 • Published 8 years ago

static-webpack-plugin v0.2.1

Weekly downloads
1
License
ISC
Repository
-
Last release
8 years ago

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();
};
0.2.1

8 years ago

0.2.0

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago