服务端中渲染react的时候,组件引用css文件报错
import './index.css'
SyntaxError: D:/code/node/my-express-react-reactRouter/src/components/header/index.css: Unexpected token, expected ; (1:5)
> 1 | html {
| ^
2 | background: red;
3 | }
4 |
该怎么解决?
服务端中渲染react的时候,组件引用css文件报错
import './index.css'
SyntaxError: D:/code/node/my-express-react-reactRouter/src/components/header/index.css: Unexpected token, expected ; (1:5)
> 1 | html {
| ^
2 | background: red;
3 | }
4 |
该怎么解决?
3 回答2.1k 阅读✓ 已解决
1 回答1.8k 阅读✓ 已解决
5 回答2.3k 阅读
2 回答1.8k 阅读✓ 已解决
4 回答1.3k 阅读
1 回答1.7k 阅读✓ 已解决
1 回答1.7k 阅读✓ 已解决
已解决
在服务端入口使用了一个css的钩子就没报错了,具体原因不
参考代码https://stackoverflow.com/que...