我正在尝试使用 react-router-4 设置服务器渲染反应。虽然它在前端(Webpack)上工作得很好。在服务器端使用时似乎preact-compat
不起作用。我正在使用babel-register
转换代码。
我这里有一个分支供参考: https ://github.com/abrcenas29/preact-sandbox-v0/tree/wip/isomorphic-react
跑步:
yarn run install
yarn run start:prod
去localhost:3100