go to  ForumEasy.com   
JavaPro
Home » Archive » Message


[Email To Friend][View in Live Context][prev topic « prev post | next post » next topic]
  Minify as bundle-min.js
 
Subject: Minify as bundle-min.js
Author: WebSpider
In response to: Webpack In Action
Posted on: 04/23/2021 04:15:20 AM

For large project with huge files, there is a need to minify those files to a single file like bundle.min.js for the purpose of fast loading. For details, please check the following links:

https://blog.logrocket.com/uglify-vs-babel-minify-vs-terser-a-mini-battle-royale/

https://github.com/facebook/create-react-app/issues/3365

 

> On 04/22/2021 11:51:59 PM WebSpider wrote:


c:\tmp\webpack\hello-w-webpack>npm run build


> hello-w-webpack@1.0.0 build C:\tmp\webpack\hello-w-webpack
> webpack -w

asset bundle.js 4.58 KiB [compared for emit] (name: main)
runtime modules 670 bytes 3 modules
cacheable modules 471 bytes
  ./src/main.js 147 bytes [built] [code generated]
  ./src/game.js 324 bytes [built] [code generated]
webpack 5.35.0 compiled successfully in 103 ms


The packed file 'bundle.js' should be shown under 'public'
[+] hello-w-webpack
 |.. [+] src
 |....... game.js
 |....... main.js
 |.. [+] public
 |....... index.html
 |....... bundle.js
 |....... style.css
 |.. package.json
 |.. webpack.config.js





References:

 


 
Powered by ForumEasy © 2002-2022, All Rights Reserved. | Privacy Policy | Terms of Use
 
Get your own forum today. It's easy and free.