postcss-flexibility
postcss-flexibility copied to clipboard
Fix: PostCSS plugin not recognised when loading under Laravel Mix
Fixes #145
@Nikschavan hi! I'm looking into changes and it's not clear to me what did you change.
I actually ran npm run lint
and fixed it's changes as well (I saw that was being run into travis) If lint changes are excluded this is how the diff would look like -
-const postcssFlexibility = () => ({
+module.exports = () => {
+ return {
postcssPlugin: 'postcss-flexibility',
Once(root) {
root.walkRules(rule => {
@@ -15,8 +16,7 @@ const postcssFlexibility = () => ({
}
});
}
-});
-
-postcssFlexibility.postcss = true;
+ }
+};
-export default postcssFlexibility;
+module.exports.postcss = true;
Here's the diff file - https://share.bsf.io/rRujRGoW
let me know if this is still unclear, I can re-do the PR with separate commits for the fix and the lint fix
@Nikschavan oh I see. I had some worries about export default
. To be honest, I would like to use it, but seems that there are some problems with transpiling. Will take a look!
Did you check this @7rulnik
Many thank yous @Nikschavan 🙏 Your change fixed the issue for me.