cuth / postcss-pxtorem

Convert pixel units to rem (root em) units using PostCSS
MIT License
2.02k stars 174 forks source link

(Help) Creating postcss.config.js in the root directory causes an error. #97

Open HugoRinderknecht opened 1 year ago

HugoRinderknecht commented 1 year ago

I get an error when I create postcss.config.js in the root directory. When I move it to the js directory I created, the error disappears. However, I am wondering if it will still work or if it needs to go through some other configuration to be effective? image image

meduzen commented 1 year ago

Not in the scope of this package, but try this:

  1. Keep your PostCSS config file where it was before.
  2. As the error message says, remove "module": true, from your package.json. If you absolutely need it for some reasons, then keep it and try to rename the PostCSS config file to postcss.config.mjs.
chenbt-hz commented 9 months ago

Thank you for your issue. I have been puzzled by this error message until now when I realized that I placed the JSON file directory incorrectly. 😄