源代码
import React from 'react';
import './index.css';
const Index = () => {
return (
<div className="box-404-wrap">
<h1 className="h1">
404
</h1>
</div>
);
};
export default Index;
转换后
import React from 'react';
const Index = () => {
return (
<>
<style jsx>
{`
.box-404-wrap h1 {
color: red;
}
`}
</style>
<div className="box-404-wrap">
<h1 className="h1">
404
</h1>
</div>
</>
);
};
export default Index;
期望读取 index.css
样式,并移动到 jsx
中,这种转换的插件怎么写?