DefinitelyTyped/html-webpack-plugin/html-webpack-plugin-tests.ts
Benjamin Lim ad66bed9da feat: add Watching, MultiCompiler, and MultiWatching types to webpack function return type
- add Compiler, Watching classes
 - add Plugin abstract class
 - change plugins to extend Plugin

BREAKING CHANGE:
 - change Plugin apply param type from Webpack to Compiler
 - remove plugin static types
 - remove Webpack and Optimize interfaces
2017-02-08 03:06:23 +08:00

25 lines
407 B
TypeScript

import * as HtmlWebpackPlugin from 'html-webpack-plugin';
new HtmlWebpackPlugin();
const optionsArray: HtmlWebpackPlugin.Options[] = [
{
title: 'test',
},
{
minify: {
caseSensitive: true,
},
},
{
chunksSortMode: function compare(a, b) {
return 1;
},
},
{
arbitrary: 'data',
},
];
const plugins: HtmlWebpackPlugin[] = optionsArray.map(options => new HtmlWebpackPlugin(options));