postcss / postcss-custom-properties

Use Custom Properties in CSS
https://postcss.github.io/postcss-custom-properties
MIT License
595 stars 77 forks source link

`importFrom` should support ESM #255

Open scinos opened 3 years ago

scinos commented 3 years ago

Looking at the docs, exportTo supports exporting a ESM module if the file ends with .mjs.

However importFrom doesn't seem to support importing .mjs files (https://github.com/postcss/postcss-custom-properties/blob/9b46ae805605842cfa3b0c2f8f8b4dd1c8c88dce/src/lib/get-custom-properties-from-imports.js#L85).

Antonio-Laguna commented 2 years ago

Fixed as of 12.1.0

romainmenke commented 2 years ago

Note : only works when executing postcss from a module context.