当前位置:网站首页>Webpack--- optimization_ cache

Webpack--- optimization_ cache

2022-06-12 03:46:00 monstkl

One 、babel cache

{
    test: //,
    loader: 'babel-loader',
    options: {
        //  The second build , Use cache content 
        cacheDirectory: true
    }
}

Two 、 Resource cache ( Production optimization )

hash: Every time webpack Unique... Will be generated at build time hash
chunkhash: The same chunk,hash equally 
contenthash: Generate according to the contents of the file hash, Of different files hash It must be different 

 Method : After packing js、css Add... To the filename contenthash

原网站

版权声明
本文为[monstkl]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/163/202206120329450912.html