4 Star 34 Fork 4

Gitee 极速下载 / vue-mmplayer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/maomao1996/Vue-mmPlayer
克隆/下载
vue.config.js 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
茂茂 提交于 2023-12-02 23:35 . chore: 使用 Prettier 格式化代码
const { defineConfig } = require('@vue/cli-service')
const path = require('path')
const dayjs = require('dayjs')
function resolve(dir) {
return path.join(__dirname, dir)
}
const isEnvProduction = process.env.NODE_ENV === 'production'
// 注入版本信息
process.env.VUE_APP_VERSION = require('./package.json').version
// 注入版本更新时间
process.env.VUE_APP_UPDATE_TIME = dayjs().locale('zh-cn').format('YYYY-MM-DD')
module.exports = defineConfig({
publicPath: '',
chainWebpack(config) {
config.resolve.alias
.set('api', resolve('src/api'))
.set('assets', resolve('src/assets'))
.set('base', resolve('src/base'))
.set('components', resolve('src/components'))
.set('pages', resolve('src/pages'))
config.plugin('html').tap((args) => {
if (isEnvProduction) {
if (!args[0].minify) {
/* 参考 https://github.com/jantimon/html-webpack-plugin#minification */
args[0].minify = {
collapseWhitespace: true,
keepClosingSlash: true,
removeComments: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true,
useShortDoctype: true,
trimCustomFragments: true,
}
}
args[0].minify.minifyJS = true
args[0].minify.minifyCSS = true
}
return args
})
},
pluginOptions: {
'style-resources-loader': {
preProcessor: 'less',
patterns: [resolve('src/styles/var.less'), resolve('src/styles/mixin.less')],
},
},
})
JavaScript
1
https://gitee.com/mirrors/vue-mmplayer.git
git@gitee.com:mirrors/vue-mmplayer.git
mirrors
vue-mmplayer
vue-mmplayer
master

搜索帮助