-
路径别名
resolve.alias
const path = require('path'); module.exports = { resolve: { alias: { "@": path.resolve(__dirname, "./src/"), "@assets": path.resolve(__dirname, "./src/assets/"), "@mixins": path.resolve(__dirname, "./src/mixins/"), "@components": path.resolve(__dirname, "./src/components/"), "@images": path.resolve(__dirname, "./src/assets/images/") }, extensions: [".*", ".js", ".vue", ".json"] } }
-
性能 performance
module.exports = { performance: {// 性能 hints: 'warning', // 枚举 false 关闭性能提示 maxEntrypointSize: 10240000000000, // 最大入口文件大小 maxAssetSize: 10240000000000, // 最大资源文件大小 }, }
《基于 Vue 组件库 的 Webpack5 配置》7.路径别名 resolve.alias 和 性能 performance
最新推荐文章于 2024-09-21 14:14:08 发布