node
前*端*之*路
分享前端技术,共走前端路,希望我踩过的坑,对小伙伴们有所帮助!
展开
-
Vue3安装依赖报错The engine “node“ is incompatible with this module
有时候运行Vue3项目,安装依赖会报各种各样的错误如:info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.error vue-types@4.0.3: The engine "node" is incompatible with this module. Expected version ">=12.16.0". Got "12.原创 2021-10-09 09:55:44 · 6837 阅读 · 4 评论 -
优化 Webpack 的构建速度
1、使用高版本的 Webpack 和 Node.js2、多进程/多实例构建:HappyPack(不维护了)、thread-loader3、压缩代码webpack-paralle-uglify-pluginuglifyjs-webpack-plugin 开启 parallel 参数 (不支持ES6)terser-webpack-plugin 开启 parallel 参数多进程并行压缩通过 mini-css-extract-plugin 提取 Chunk 中的 CSS 代码到单独文件,通过 css原创 2020-06-04 10:41:51 · 324 阅读 · 0 评论