鍍金池/ 問答/HTML/ ant design 如何用于asp.net core 2.0 react sp

ant design 如何用于asp.net core 2.0 react spa 中?

你好,我想把a(bǔ)nt design 放到asp.net core 2.0 react spa中。但是嘗試了一下,會報(bào)錯(cuò)。請高手幫忙解決。

我在asp.net core 2.0中創(chuàng)建web項(xiàng)目,并選擇react架構(gòu)。然后vs2017就會生成具有react相關(guān)基礎(chǔ)的項(xiàng)目。

  1. 然后我把a(bǔ)nt design目錄放到ClientApp目錄中。
  2. 修改“tsconfig.json”文件,新增"allenJs":true
  3. 把CliantApp/boot.tsx中指向routes.tsx改成指向ClientApp/src/router.js。

編譯,沒法通過編譯。報(bào)錯(cuò):
src/router.tsx
Module build failed: Error: ENOENT: no such file or directory, open 'C:UserstestSourceReposSolutionimplementationsrcWebSitesWebSites.ReactClientAppsrcrouter.tsx'
@ ./ClientApp/boot.tsx 7:0-45 19:4-22:6 19:38-22:5 20:17-40
@ multi react-hot-loader/patch event-source-polyfill webpack-hot-middleware/client?path=__webpack_hmr&dynamicPublicPath=true ./ClientApp/boot.tsx
ERROR in [at-loader] ./ClientApp/boot.tsx:7:31

TS6143: Module './src/router' was resolved to 'C:/Users/test/Source/Repos/Solution/implementation/src/WebSites/WebSites.React/ClientApp/src/router.js', but '--allowJs' is not set

回答
編輯回答
好難瘦

貌似是路徑的問題。

2017年1月12日 19:49