代码拉取完成,页面将自动刷新
同步操作将从 ShopSuite商城系统/ShopSuite管理端 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
/* eslint-disable @typescript-eslint/no-unused-vars */
/**
* @description vue.config.js全局配置
*/
const {
baseURL,
title,
devPort,
assetsDir,
outputDir,
lintOnSave,
publicPath,
transpileDependencies,
} = require('./src/config')
const dayjs = require('dayjs')
const pkg = require('./package.json')
const { resolve, relative } = require('path')
const { defineConfig } = require('@vue/cli-service')
const {
createVuePlugin,
createChainWebpack,
} = require('./library/build/index.ts')
const pc = require('picocolors')
const info = {
...pkg,
lastBuildTime: dayjs().format('YYYY-MM-DD HH:mm:ss'),
}
process.env.VUE_APP_TITLE = title
process.env.VUE_APP_AUTHOR = pkg.author
process.env.VUE_APP_INFO = JSON.stringify(info)
process.env.VUE_APP_UPDATE_TIME = info.lastBuildTime
process.env.VUE_APP_RANDOM = `${info.lastBuildTime}-${process.env.VUE_APP_DOMAIN}`
module.exports = defineConfig({
publicPath,
assetsDir,
outputDir,
lintOnSave,
transpileDependencies,
devServer: {
compress: true,
client: {
progress: false,
overlay: {
warnings: false,
errors: true,
},
},
hot: true,
open: {
target: [`http://localhost:${devPort}`],
},
port: devPort,
},
pwa: {
workboxOptions: {
skipWaiting: true,
clientsClaim: true,
},
themeColor: '#ffffff',
msTileColor: '#ffffff',
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'black',
manifestOptions: {
name: 'ShopSuite - Admin',
short_name: 'ShopSuite',
background_color: '#ffffff',
},
},
configureWebpack() {
return {
resolve: {
alias: {
'~': resolve(__dirname, '.'),
'@': resolve(__dirname, 'src'),
'/#': resolve(__dirname, 'types'),
'@sslib': resolve(__dirname, 'library'),
'@gp': resolve('library/plugins/ms'),
},
fallback: {
fs: false,
path: require.resolve('path-browserify'),
},
},
plugins: createVuePlugin(),
performance: {
hints: false,
},
}
},
chainWebpack(config) {
createChainWebpack(process.env.NODE_ENV, config)
},
runtimeCompiler: false,
productionSourceMap: false,
css: {
sourceMap: false,
extract:
process.env.NODE_ENV === 'production'
? {
ignoreOrder: true,
}
: false,
loaderOptions: {
sass: {
sassOptions: { outputStyle: 'expanded' },
additionalData(content, { rootContext, resourcePath }) {
const relativePath = relative(rootContext, resourcePath)
if (
relativePath.replace(/\\/g, '/') !==
'library/styles/variables.scss'
)
return `@use "~@sslib/styles/variables.scss" as *;${content}`
return content
},
},
},
},
})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。