Commit 68dba373 authored by 郝聪敏's avatar 郝聪敏

初始化项目

parent 5f01a742
Pipeline #619 canceled with stages
const path = require("path");
const resolve = dir => path.join(__dirname, dir);
const IS_PROD = process.env.NODE_ENV === 'production';
module.exports = {
chainWebpack: config => {
// 修复HMR
config.resolve.symlinks(true);
// 移除 prefetch 插件(针对生产环境首屏请求数进行优化)
config.plugins.delete('prefetch')
// 移除 preload 插件(针对生产环境首屏请求数进行优化) preload 插件的用途:https://cli.vuejs.org/zh/guide/html-and-static-assets.html#preload
config.plugins.delete('preload')
// 添加别名
config.resolve.alias
.set("@", resolve("src"))
return config;
},
lintOnSave: true,
runtimeCompiler: false, // 是否使用包含运行时编译器的 Vue 构建版本
productionSourceMap: IS_PROD, // 生产环境的 source map
};
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment