账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    ant design 如何用于asp.net core 2.0 react spa 中?
    33
    0

    你好,我想把ant design 放到asp.net core 2.0 react spa中。但是尝试了一下,会报错。请高手帮忙解决。

    我在asp.net core 2.0中创建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
    
    
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • ペ青柠檬 超级管理员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部