html篇
https://blog.csdn.net/kikikiuu/article/details/110010134
CSS篇
https://blog.csdn.net/kikikiuu/article/details/110010100
JS篇
https://blog.csdn.net/kikikiuu/article/details/110009458
浏览器篇
https://blog.csdn.net/kikikiuu/article/details/110010152
Vue篇
https://blog.csdn.net/kikikiuu/article/details/105102202
小程序篇
https://blog.csdn.net/kikikiuu/article/details/110065075
开发及性能篇
https://blog.csdn.net/kikikiuu/article/details/110010173
webpack篇
webpack常用插件汇总
clean-webpack-plugin
打包前清除已存在的dist目录
html-webpakc-plugin
用于生成html的插件
externals
告诉weboack在构建代码中 有哪些是不用被打包的模块
extract-text-webpack-plugin
将css生成文件,而不是内联
如何减少webpack的打包体积
1、去除不必要的插件 刚开始用 webpack 的时候,开发环境和生产环境用的是同一个 webpack 配置文件,导致生产环境打包的
JS 文件包含了一大堆没必要的插件,比如 HotModuleReplacementPlugin, NoErrorsPlugin…
这时候不管用什么优化方式,都没多大效果。所以,如果你打包后的文件非常大的话,先检查下是不是包含了这些插件。
2、去除devtool选项
很多教程都会教你在webpack.config.js中设置devtool选项,比如devtool: ‘eval-source-map’。但是这只适用于开发环境,这会造成打包的文件往往有几M,所以在生产环境必须去除此配置
3.按需打包
使用Lodash时,往往只需要使用其中部分功能,但整个文件引入是不合理的,我们需要通过插件让Webpack按需引入模块。
配置webpack.config.js
var LodashModuleReplacementPlugin = require('lodash-webpack-plugin');
var webpack = require('webpack');
module.exports = {
module: {
loaders: [{
loader: 'babel',
test: /\.js$/,
exclude: /node_modules/
}]
},
babel: {
presets: ['es2015'],
plugins: ['transform-runtime', 'lodash']
},
plugins: [
new LodashModuleReplacementPlugin,
new webpack.optimize.OccurrenceOrderPlugin,
new webpack.optimize.UglifyJsPlugin
]
}
https://blog.csdn.net/js_admin/article/details/76824004