Skip to content

Commit a1f09c9

Browse files
committedJan 19, 2020
fix: add default options to webpack plugin
- add default options, fix webpack plugin has undefined extractors
1 parent 069b26a commit a1f09c9

File tree

2 files changed

+2
-73
lines changed

2 files changed

+2
-73
lines changed
 

Diff for: ‎packages/purgecss-webpack-plugin/__tests__/parse.test.js

-72
This file was deleted.

Diff for: ‎packages/purgecss-webpack-plugin/src/index.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as fs from "fs";
2-
import { PurgeCSS } from "purgecss";
2+
import PurgeCSS, { defaultOptions } from "purgecss";
33
import { ConcatSource } from "webpack-sources";
44
import * as search from "./search";
55
import { UserDefinedOptions, PurgedStats, PurgeAsset } from "./types";
@@ -91,6 +91,7 @@ export default class PurgeCSSPlugin {
9191
// Compile through Purgecss and attach to output.
9292
// This loses sourcemaps should there be any!
9393
const options = {
94+
...defaultOptions,
9495
...this.options,
9596
content: filesToSearch,
9697
css: [

0 commit comments

Comments
 (0)