Skip to content

Commit

Permalink
fix: ExtractCssChunksPlugin.loader is a string (#291)
Browse files Browse the repository at this point in the history
Because else it doesn't work with:
```
{
          loader: CssExtractPlugin.loader,
          options: { hmr: !production && target !== 'node' },
        }
```

type Loader is `string | NewLoader` and `NewLoader` is:

```
interface NewLoader {
        loader: string;
        options?: { [name: string]: any };
    }
```
  • Loading branch information
christophehurpeau committed Aug 9, 2020
1 parent c3c22f8 commit c640252
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.d.ts
@@ -1,8 +1,8 @@
declare module 'extract-css-chunks-webpack-plugin' {
import { ChunkData, Loader, Plugin } from 'webpack';
import { ChunkData, Plugin } from 'webpack';

class ExtractCssChunksPlugin extends Plugin {
static loader: Loader;
static loader: string;

constructor(options?: ExtractCssChunksPlugin.PluginOptions);
}
Expand Down

0 comments on commit c640252

Please sign in to comment.