1 Star 8 Fork 3

云香水识/group_chat

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.f2econfig.demo.js 1.83 KB
一键复制 编辑 原始数据 按行查看 历史
// @ts-check
const { port, publicPath, server } = require('./lib/config').default
const { version } = require('./package.json')
/**
* @type {import('f2e-server').F2EConfig}
*/
const config = {
// @ts-ignore
publicPath, version, logout: server.logout, admin: server.admin,
port,
livereload: true,
build: false,
__withlog__: true,
gzip: true,
buildFilter: (p) => /^(.esbuild\/?(external|$)|index|css|src\/?(index|$)|$)/.test(p),
watchFilter: (p) => /^(index|css|src|$)/.test(p),
namehash: {
replacer: (name, hash) => `${publicPath}/${name}?${hash}`
},
useLess: {
globalVars: {
'publicPath': `"${publicPath}"`,
}
},
middlewares: [
{ middleware: 'template', test: /\.html?/ },
{
middleware: 'esbuild',
test: /^\/?static\b/,
watches: [/\.(tsx?|less)$/],
options: {
publicPath: publicPath + '/static',
define: {
"process.env.NODE_ENV": '"dev"',
},
}
},
{
middleware: 'proxy',
test: /^\/?(api|loginback|uni-auth|uniadmin|asserts|static|css)/,
url: server.base,
responseHeaders: (resp) => {
if (resp.headers && resp.headers.location) {
return {
...resp.headers,
location: '/',
}
}
return resp.headers
}
},
require('./lib').default,
],
try_files: [
{
test: new RegExp(publicPath.replace(/^./, '^\/?')),
replacer: '/',
index: 'index.html',
},
{
test: /.*/,
location: publicPath,
},
],
}
module.exports = config
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shy9120/group_chat.git
[email protected]:shy9120/group_chat.git
shy9120
group_chat
group_chat
master

搜索帮助