// Vue.config.js 配置选项
module.exports = {
// 选项
// 部署应用时的基本 URL
// baseUrl: process.env.NODE_ENV === 'production' ? '192.168.60.110:8080' : '192.168.60.110:8080',
// 基本路径
publicPath: './', // 构建时的输出目录
outputDir: 'dist', // 放置静态资源的目录
assetsDir: 'static', // html 的输出路径
// 指定生成的 index.html 的输出路径 (相对于 outputDir)。也可以是一个绝对路径。
indexPath: 'index.html', // 文件名哈希
filenameHashing: true, // 用于多页配置,默认是 undefined
pages: {
index: {
// page 的入口文件
entry: 'src/main.js', // 模板文件
template: 'public/index.html', // 在 dist/index.html 的输出文件
filename:
vue.config.js
最新推荐文章于 2023-10-20 10:55:53 发布
本文深入探讨Vue.js项目的配置文件vue.config.js,讲解如何自定义Webpack配置,包括公共路径设置、代理服务器、打包输出目录、CSS提取、别名配置等关键选项,助力提升开发效率。
摘要由CSDN通过智能技术生成