webpack-fabricator-assemble

1.1.0 • Public • Published

Webpack Fabricator Assemble

A webpack plugin for the fabricator-assemble module.

How to install

npm i --save-dev webpack-fabricator-assemble

Examples

Without using the HtmlWebpackPlugin

const path = require('path');
const WebpackFabricatorAssemble = require('webpack-fabricator-assemble');

module.exports = {
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'bundle.js'
  },
  plugins: [
    new WebpackFabricatorAssemble()
  ]
};

With using the HtmlWebpackPlugin

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const WebpackFabricatorAssemble = require('webpack-fabricator-assemble')(HtmlWebpackPlugin);

module.exports = {
  entry: './src/index.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'bundle.js'
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: path.resolve(__dirname, 'src/views/layouts/default.html'),
      filename: path.resolve(__dirname, 'dist/default.html'),
      inject: false
    }),
    new WebpackFabricatorAssemble({
      layouts: [path.resolve(__dirname, 'dist/default.html')],
    }),
  ]
};

License

MIT © ksotello

Package Sidebar

Install

npm i webpack-fabricator-assemble

Weekly Downloads

209

Version

1.1.0

License

MIT

Unpacked Size

7.99 kB

Total Files

16

Last publish

Collaborators

  • ksotello