Skip to content

ecliptic/webpack-blocks-html

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.