perf: 模板优化
This commit is contained in:
@@ -26,8 +26,8 @@ export default defineConfig({
|
||||
globPatterns: ['**/*.{js,css,html,svg,jpg,ico}']
|
||||
},
|
||||
manifest: {
|
||||
name: 'vue模板',
|
||||
short_name: 'vue模板',
|
||||
name: 'Excel处理工具',
|
||||
short_name: '处理工具',
|
||||
theme_color: '#fff', // 浏览器状态栏主题
|
||||
start_url: './',
|
||||
display: 'standalone',
|
||||
@@ -39,7 +39,6 @@ export default defineConfig({
|
||||
type: 'image/png',
|
||||
purpose: 'any'
|
||||
},
|
||||
|
||||
{
|
||||
src: 'logo.png',
|
||||
sizes: '512x512',
|
||||
@@ -67,17 +66,13 @@ export default defineConfig({
|
||||
open: true,
|
||||
proxy: {
|
||||
'/api': {
|
||||
// 7566
|
||||
// target: 'http://192.168.39.120:7566',
|
||||
target: 'http://127.0.0.1:8066',
|
||||
target: 'http://10.2.0.32:5000',
|
||||
changeOrigin: true,
|
||||
rewrite: p => p.replace(/^\/api/, ''),
|
||||
bypass: (req, res, options) => {
|
||||
// @ts-ignore
|
||||
const proxyURL = options.target + options.rewrite(req.url)
|
||||
// console.log('proxyURL', proxyURL)
|
||||
req.headers['x-req-proxyURL'] = proxyURL // 设置未生效
|
||||
// @ts-ignore
|
||||
res.setHeader('x-req-proxyURL', proxyURL) // 设置响应头可以看到
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user