Support to integrate PostCSS along with Prettier #15941
Replies: 2 comments 2 replies
-
Anyone please help me?? kindly share some code to implement this or some reference link or even just correct the given code also would help me. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hey I fixed this issue. its working for me now. thanks All |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Environments:
Steps to reproduce:
See I am using prettier to parse a code from an editor its working for me when using JSX syntax on babel parsing but i am not able to do the same in case of CSS along with PostCss
Please find my below peace of code. conditions are working fine. nothing on it. only the parser is not working fine. correct me if i need to add or change the code.
const formatted = prettier.format(
activeCode.code,
sandpack.activeFile.endsWith(".css")
? { parser: "css", plugins: [postcss] }
: {
parser: "babel",
plugins: [parserBabel],
bracketSpacing: false,
bracketSameLine: true,
}
);
Expected behavior:
It should be Formatted
Actual behavior:
Not formatting css.
Beta Was this translation helpful? Give feedback.
All reactions