Skip to content
This repository was archived by the owner on Feb 3, 2020. It is now read-only.
This repository was archived by the owner on Feb 3, 2020. It is now read-only.

whitelistPatterns defined in package.json does not work #24

Description

@franciscolourenco

Describe the bug
whitelistPatterns/whitelistPatternsChildren defined inside of package.json files don't work, probably because they are strings, not regexes. The following error is thrown while building:

TypeError: v.test is not a function

To Reproduce

  1. Config the whitelistPatternsChildren option in package.json via postcss-load-config.
  2. Build.

Expected behavior
Strings found inside whitelistPatterns/whitelistPatternsChildren should be converted into regexes.

Screenshots
package.json

  "postcss": {
    "plugins": {
      "tailwindcss": "./tailwind.config.js",
      "vue-cli-plugin-tailwind/purgecss": {
        "whitelistPatternsChildren": ["/^el-/"],
      },
      "autoprefixer": {}
    }
  },

Desktop (please complete the following information):

  • OS: macOS
  • Version of Purgecss "@fullhuman/postcss-purgecss": "^1.1.0"

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions