assemble-webpack-loader

0.1.0 • Public • Published

assemble-webpack-loader

NPM version

Webpack loader for Assemble.

Install

yarn add assemble-webpack-loader -D

Usage

const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
 
module.exports = {
  module: {
    rules: [
      {
        test: /\.hbs$/,
        use: [
          { loader: 'html-loader' },
          {
            loader: 'assemble-webpack-loader',
            options: {
              layouts: path.resolve('./src/html/layouts/**/*.hbs'),
              partials: path.resolve('./src/html/partials/**/*.hbs'),
              define: {
                __TEST__: 'test'
              }
            }
          }
        ]
      }
    ]
  },
  plugins: [
    new HtmlWebpackPlugin({
      template: path.resolve('./src/html/pages/index.hbs'),
      filename: 'index.html'
    })
  ]
}

Example

Please see example.

Readme

Keywords

none

Package Sidebar

Install

npm i assemble-webpack-loader

Weekly Downloads

110

Version

0.1.0

License

MIT

Unpacked Size

3.42 kB

Total Files

3

Last publish

Collaborators

  • conechan