美文网首页
0.8 Using a CDN 使用CDN

0.8 Using a CDN 使用CDN

作者: 人头原子弹 | 来源:发表于2017-03-10 23:18 被阅读0次

    If you don't want to use npm to manage client packages, the react and react-dom npm packages also provide single-file distributions in dist folders, which are hosted on a CDN:

    如果你不想使用npm去管理客户端的包,react和react-dom的npm包同样提供一个单独文件,它们发布到了CDN的dist文件夹里。

    <script src="https://unpkg.com/react@15/dist/react.js"></script>
    <script src="https://unpkg.com/react-dom@15/dist/react-dom.js"></script>

    The versions above are only meant for development, and are not suitable for production.

    以上版本仅用于开发,不适合生产。

    Minified and optimized production versions of React are available at:

    压缩和优化过得生产版本的React可以在:

    <script src="https://unpkg.com/react@15/dist/react.min.js"></script>
    <script src="https://unpkg.com/react@15/dist/react-dom.min.js"></script>

    To load a specific version of react and react-dom, replace 15 with the version number.

    替换版本号15可以加载一个特定的React和React-dom版本。

    If you use Bower, React is available via the react package.

    如果你使用浏览器,React可通过react包获得。

    相关文章

      网友评论

          本文标题:0.8 Using a CDN 使用CDN

          本文链接:https://www.haomeiwen.com/subject/apgogttx.html