V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
ilaipi
V2EX  ›  问与答

bootcss 的 cdn 挂了,我们的平台也挂了

  •  1
     
  •   ilaipi · Oct 14, 2018 · 3961 views
    This topic created in 2755 days ago, the information mentioned may be changed or developed.
    挂了之后我换了 cdn,看 v2ers 推荐用了 loli.net 的,现在看 network,库都能正常加载了。

    但是 js 在执行的时候会报 require is not defined,然后就导致 react 执行不了,整个瘫痪。

    这种情况有点懵,不知道怎么查问题了...
    Supplement 1  ·  Oct 14, 2018
    问题解决了,是我没搞懂 umd 和 cjs,在引用 react 的时候引用了 cjs 的版本,应该引用 umd 的。感谢我的前端兄弟支持
    4 replies    2018-10-14 15:19:55 +08:00
    mYYnSmiTEQWcCwAr
        1
    mYYnSmiTEQWcCwAr  
       Oct 14, 2018
    你可以换回去 自动跳转到 cloudflare 也不是不能用嘛
    mYYnSmiTEQWcCwAr
        2
    mYYnSmiTEQWcCwAr  
       Oct 14, 2018
    先保证可用 再谈优化
    ilaipi
        3
    ilaipi  
    OP
       Oct 14, 2018
    @cy97cool 我先改成 cloudflare 也不行才改到 loli 这边,奇怪,感觉就是 polyfill 的问题
    Twinkle
        4
    Twinkle  
       Oct 14, 2018 via Android
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   834 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 20:00 · PVG 04:00 · LAX 13:00 · JFK 16:00
    ♥ Do have faith in what you're doing.