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

whitelistPatterns defined in package.json does not work #24

Open
franciscolourenco opened this issue Mar 28, 2019 · 0 comments
Open

whitelistPatterns defined in package.json does not work #24

franciscolourenco opened this issue Mar 28, 2019 · 0 comments

Comments

@franciscolourenco
Copy link

franciscolourenco commented Mar 28, 2019

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"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant