Skip to content

Latest commit

 

History

History
52 lines (35 loc) · 1.45 KB

README.md

File metadata and controls

52 lines (35 loc) · 1.45 KB

webpack-blocks-html

A webpack-block for html-webpack-plugin.

JavaScript Style Guide NPM Version

Version compatibility:

  • webpack-blocks v0.x -> webpack-blocks-html v1.x (@latest)
  • webpack-blocks v1.x -> DEPRECATED: Merged into webpack-blocks-utils

Installation

yarn add --dev webpack-blocks-html

or

npm install --save-dev webpack-blocks-html

Usage

import {createConfig, entryPoint, setOutput} from '@webpack-blocks/webpack2'
import babel from '@webpack-blocks/babel6'
import html from './src/webpack-block-html'

export default createConfig([
  entryPoint(['babel-polyfill', './src/Main.js']),
  setOutput('./build/bundle.js'),
  babel(),
  html({template: 'assets/index.html'}),
])

Options

See the options list here.

Defaults:

  • filename: 'index.html'
  • template: 'templates/index.html'
  • showErrors: false

License

This project is licensed under MIT.