在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

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

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

你好,我想把ant design 放到asp.net core 2.0 react spa中。但是嘗試了一下,會報錯。請高手幫忙解決。

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

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

編譯,沒法通過編譯。報錯:
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