File tree Expand file tree Collapse file tree 1 file changed +40
-12
lines changed Expand file tree Collapse file tree 1 file changed +40
-12
lines changed Original file line number Diff line number Diff line change 1- // TODO: I don't know if it's possible to document default values...
1+ declare namespace AddAssetHtmlPlugin {
2+ interface Options {
3+ /**
4+ * The absolute path of the file you want to add to the compilation, and resulting HTML file.
5+ * Mandatory.
6+ */
7+ filepath : string ;
28
3- interface PluginOptions {
4- filepath : string ;
5- typeOfAsset ?: string ;
6- includeSourcemap ?: boolean ;
7- hash ?: boolean ;
8- outputPath ?: string ;
9- publicPath ?: string ;
10- }
9+ /**
10+ * If true, will append a unique hash of the file to the filename. This is useful for cache busting.
11+ * Default false.
12+ */
13+ hash ?: boolean ;
14+
15+ /**
16+ * If true, will add filepath + '.map' to the compilation as well.
17+ * Default true.
18+ */
19+ includeSourcemap ?: boolean ;
20+
21+ /**
22+ * If set, will be used as the output directory of the file.
23+ */
24+ outputPath ?: string ;
1125
12- export class AddAssetHtmlPlugin {
13- constructor ( options : PluginOptions ) ;
26+ /**
27+ * If set, will be used as the public path of the script or link tag.
28+ */
29+ publicPath ?: string ;
1430
15- apply ( compiler ) : void ;
31+ /**
32+ * Can be set to css to create a link-tag instead of a script-tag.
33+ * Default 'js'
34+ */
35+ typeOfAsset ?: string ;
36+ }
1637}
38+
39+ declare class AddAssetHtmlPlugin {
40+ constructor ( options : AddAssetHtmlPlugin . Options ) ;
41+ apply ( compiler : any ) : void ;
42+ }
43+
44+ export = AddAssetHtmlPlugin ;
You can’t perform that action at this time.
0 commit comments