2 Star 7 Fork 7

AnyAnt / rssant-web

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 2.27 KB
一键复制 编辑 原始数据 按行查看 历史
guyskk 提交于 2020-07-26 23:35 . upgrade vue-cli 4.6, remove small favicon.
const publicPath = '/'
const assetsVersion = process.env.VUE_APP_ICONS_VERSION || ''
const assetsVersionSuffix = assetsVersion ? `?v=${assetsVersion}` : ''
module.exports = {
publicPath: publicPath,
// https://cli.vuejs.org/core-plugins/pwa.html#configuration
pwa: {
name: '蚁阅',
workboxPluginMode: 'GenerateSW',
workboxOptions: {
// https://github.com/GoogleChrome/workbox/releases
// https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin
importWorkboxFrom: 'local',
importsDirectory: 'libs',
exclude: [/\.map$/, /^manifest.*\.js$/, /libs\/MathJax-.*$/],
// https://developers.google.com/web/tools/workbox/reference-docs/latest/module-workbox-build#.generateSW
navigateFallback: publicPath + 'index.html',
navigateFallbackBlacklist: [/^\/api.*$/, /^\/admin.*$/, /^\/changelog.*$/, /^.*\..*$/],
},
// https://github.com/vuejs/vue-cli/blob/dev/packages/@vue/cli-plugin-pwa/lib/HtmlPwaPlugin.js
themeColor: '#FFFFFF',
msTileColor: '#FFFFFF',
appleMobileWebAppCapable: 'yes',
appleMobileWebAppStatusBarStyle: 'default',
assetsVersion: assetsVersion,
manifestPath: 'manifest.json',
manifestOptions: {
start_url: publicPath,
icons: [
{
src: `${publicPath}img/icons/android-chrome-192x192.png${assetsVersionSuffix}`,
sizes: '192x192',
type: 'image/png',
},
{
src: `${publicPath}img/icons/android-chrome-512x512.png${assetsVersionSuffix}`,
sizes: '512x512',
type: 'image/png',
},
],
background_color: '#FFFFFF',
},
iconPaths: {
// will auto prefix '/' and auto add assetsVersion
favicon32: null,
favicon16: null,
appleTouchIcon: 'img/icons/apple-touch-icon.png',
maskIcon: 'img/icons/safari-pinned-tab.svg',
msTileImage: 'img/icons/msapplication-icon-150x150.png',
},
},
devServer: {
port: 6789,
disableHostCheck: true,
proxy: {
'/api/v1/image': {
target: 'http://127.0.0.1:6786',
},
'/api': {
target: 'http://127.0.0.1:6788',
},
'/static': {
target: 'http://127.0.0.1:6788',
},
'/changelog': {
target: 'http://127.0.0.1:6788',
},
},
},
}
1
https://gitee.com/anyant/rssant-web.git
git@gitee.com:anyant/rssant-web.git
anyant
rssant-web
rssant-web
master

搜索帮助