久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='zmMvy'></small><noframes id='zmMvy'>

<legend id='zmMvy'><style id='zmMvy'><dir id='zmMvy'><q id='zmMvy'></q></dir></style></legend>

      <tfoot id='zmMvy'></tfoot>
      • <bdo id='zmMvy'></bdo><ul id='zmMvy'></ul>
      1. <i id='zmMvy'><tr id='zmMvy'><dt id='zmMvy'><q id='zmMvy'><span id='zmMvy'><b id='zmMvy'><form id='zmMvy'><ins id='zmMvy'></ins><ul id='zmMvy'></ul><sub id='zmMvy'></sub></form><legend id='zmMvy'></legend><bdo id='zmMvy'><pre id='zmMvy'><center id='zmMvy'></center></pre></bdo></b><th id='zmMvy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='zmMvy'><tfoot id='zmMvy'></tfoot><dl id='zmMvy'><fieldset id='zmMvy'></fieldset></dl></div>

        React.js app.js 文件大小

        React.js app.js file size(React.js app.js 文件大小)
          <bdo id='CtNBa'></bdo><ul id='CtNBa'></ul>

          • <small id='CtNBa'></small><noframes id='CtNBa'>

              1. <i id='CtNBa'><tr id='CtNBa'><dt id='CtNBa'><q id='CtNBa'><span id='CtNBa'><b id='CtNBa'><form id='CtNBa'><ins id='CtNBa'></ins><ul id='CtNBa'></ul><sub id='CtNBa'></sub></form><legend id='CtNBa'></legend><bdo id='CtNBa'><pre id='CtNBa'><center id='CtNBa'></center></pre></bdo></b><th id='CtNBa'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='CtNBa'><tfoot id='CtNBa'></tfoot><dl id='CtNBa'><fieldset id='CtNBa'></fieldset></dl></div>
                <tfoot id='CtNBa'></tfoot>
              2. <legend id='CtNBa'><style id='CtNBa'><dir id='CtNBa'><q id='CtNBa'></q></dir></style></legend>
                  <tbody id='CtNBa'></tbody>
                1. 本文介紹了React.js app.js 文件大小的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我創建了包含 7 個頁面和 13 個組件的非常簡單的 react 應用程序.我正在使用 gulp 編譯它,browserify 用于依賴項,所有文件都被最小化.

                  I created pretty simple react application containing 7 pages and 13 components. I am using gulp to compile it, browserify for dependencies, all files are minimized.

                  我構建的 app.js 文件有 1.1 MB.我覺得挺大的.

                  My build'ed app.js file has 1.1 MB. I think it is quite big.

                  我能做些什么來減小它的大小?有沒有什么好的做法可以實現最小尺寸?

                  What can I do to reduce its size ? Are there any good practices to achieve smallest size ?

                  我沒有依賴的源代碼是91 KB.

                  My source code without dependencies is 91 KB.

                  推薦答案

                  使用 webpack-uglify 并禁用 source maps 可以極大地提高輸出到合理的大小(對于 hello world 應用程序約為 140kbs)

                  Using webpack-uglify and disabling source maps can greatly improve the output to a reasonable size (~140kbs for a hello world application)

                  幾個步驟:

                  將 webpack 配置中的 devtool 設置為 cheap-source-mapcheap-module-source-map 以便不捆綁源映射輸出:

                  Setting devtool in webpack config to cheap-source-map or cheap-module-source-map so the source maps are not bundled with the output:

                  {
                    eval: 'cheap-source-map'
                  }
                  

                  激活 uglify 插件或使用 -p 參數調用 webpack

                  Activate uglify plugin or call webpack with -p argument

                  plugins: [
                    new webpack.optimize.UglifyJsPlugin({
                      compress: {
                        warnings: false
                      }
                    })
                  ]
                  

                  為生產定義節點環境導致 webpack 刪除測試助手并優化輸出大小:

                  Defining node environment for production causes webpack to remove test helpers and optimize the ouput size:

                  plugins: [
                    new webpack.DefinePlugin({
                      'process.env': {
                        'NODE_ENV': JSON.stringify('production')
                      },
                    })
                  ]
                  

                  注意:這些步驟應僅用于生產構建,因為它們會增加構建時間.

                  Note: these steps should be only used for production builds as they increase the build time.

                  資源:https://medium.com/modus-create-front-end-development/optimizing-webpack-production-build-for-react-es6-apps-a637e5692aea#.bug2p64de

                  這篇關于React.js app.js 文件大小的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Browserify, Babel 6, Gulp - Unexpected token on spread operator(Browserify,Babel 6,Gulp - 傳播運算符上的意外令牌)
                  Is it possible to pass a flag to Gulp to have it run tasks in different ways?(是否可以將標志傳遞給 Gulp 以使其以不同的方式運行任務?)
                  Why do we need to install gulp globally and locally?(為什么我們需要在全局和本地安裝 gulp?)
                  How to run Gulp tasks sequentially one after the other(如何一個接一個地依次運行 Gulp 任務)
                  Stylesheet not loaded because of MIME-type(由于 MIME 類型而未加載樣式表)
                  Visual Studio 2015 crashes when opening Javascript files(打開 Javascript 文件時 Visual Studio 2015 崩潰)
                        <tbody id='mpyaz'></tbody>

                      <legend id='mpyaz'><style id='mpyaz'><dir id='mpyaz'><q id='mpyaz'></q></dir></style></legend>
                        <bdo id='mpyaz'></bdo><ul id='mpyaz'></ul>
                        <tfoot id='mpyaz'></tfoot>

                          <small id='mpyaz'></small><noframes id='mpyaz'>

                          <i id='mpyaz'><tr id='mpyaz'><dt id='mpyaz'><q id='mpyaz'><span id='mpyaz'><b id='mpyaz'><form id='mpyaz'><ins id='mpyaz'></ins><ul id='mpyaz'></ul><sub id='mpyaz'></sub></form><legend id='mpyaz'></legend><bdo id='mpyaz'><pre id='mpyaz'><center id='mpyaz'></center></pre></bdo></b><th id='mpyaz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='mpyaz'><tfoot id='mpyaz'></tfoot><dl id='mpyaz'><fieldset id='mpyaz'></fieldset></dl></div>
                          • 主站蜘蛛池模板: 亚州影院 | 在线亚洲精品 | 国产成人综合在线 | 国产一区二区 | 精品一区在线看 | 亚洲大片一区 | av大片在线观看 | 精品国产一区二区三区久久久久久 | 久久成人精品视频 | 欧美一级三级在线观看 | 黄色网址在线免费观看 | 在线视频成人 | 美女国产| 91精品国产一区二区三区 | www.47久久青青 | 亚洲欧美一区二区三区国产精品 | 亚洲精品在线播放 | 国产精品久久久久一区二区 | 91精品国产一区二区三区 | 欧美日韩在线一区二区 | 日韩欧美一区二区三区四区 | 美女在线视频一区二区三区 | www.久久 | 亚洲三区在线播放 | 亚洲a人| 6996成人影院网在线播放 | 99久久日韩精品免费热麻豆美女 | 先锋资源在线 | 欧美一级免费看 | 成人免费区一区二区三区 | 国产精品99久久久久久人 | 天天干天天操天天射 | 日韩中文字幕一区 | 美国十次成人欧美色导视频 | 欧美激情在线播放 | 在线中文视频 | 成人在线国产 | 欧美在线观看一区 | 国产1区2区在线观看 | 日韩国产在线 | 久久久久久国产精品免费免费狐狸 |