![](/img/trans.png)
[英]vs code prettier - adds new line after @Input() decorator in angular
[英]Prettier Adds Space Before and After Angle Brackets of Tags in JSX in VS Code
保存后我想美化一個jsx文件,但更漂亮地在<>
之間添加空格。 例如<p>
更改為< p >
,這在jsx
上引起了問題
const elem = <h1> Hello React </h1>;
console.log(elem);
至
const elem = < h1 > Hello React < /h1>;
console.log(elem);
你能讓我知道如何解決這個問題嗎
您是否還同時安裝了Beautify ? 有一個問題記錄了與該擴展名的已知沖突。
要解決此問題,請將以下內容添加到您的工作空間配置中:
"beautify.ignore": [
"**/*.js",
"**/*.jsx"
]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.