Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
declare module 'extract-css-chunks-webpack-plugin' {
import { ChunkData, Loader, Plugin } from 'webpack';

class ExtractCssChunksPlugin extends Plugin {
static loader: Loader;

constructor(options?: ExtractCssChunksPlugin.PluginOptions);
}

namespace ExtractCssChunksPlugin {
interface PluginOptions {
/**
* The filename of the entry chunk.
*/
filename?: string;
/**
* The filename of non-entry chunks.
*/
chunkFilename?: string;
/**
* Generates a file name (or template) based on chunk data.
*/
moduleFilename?: (chunk: ChunkData) => string;
/**
* Remove warnings about conflicting order.
*/
ignoreOrder?: boolean;
/**
* Inserts `<link>` at the given position (https://github.com/faceyspacey/extract-css-chunks-webpack-pluginn#insert).
*/
insert?: string | Function;
}
}

export = ExtractCssChunksPlugin;
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"extract-css-chunks-webpack-plugin"
],
"main": "dist/cjs.js",
"types": "index.d.ts",
"engines": {
"node": ">= 6.9.0"
},
Expand Down Expand Up @@ -59,7 +60,8 @@
"travis": "npm run ci:coverage"
},
"files": [
"dist"
"dist",
"index.d.ts"
],
"peerDependencies": {
"webpack": "^4.4.0 || ^5.0.0"
Expand Down