1 Star 1 Fork 1

f2e-server/create-tabs-app

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.f2econfig.build.js 933 Bytes
一键复制 编辑 原始数据 按行查看 历史
shiyangyang 提交于 2023-04-26 18:09 . 更新 f2e-server
// @ts-check
const options = {
define: {
"process.env.NODE_ENV": '"production"',
},
}
/**
* @type {import('f2e-server').F2EConfig}
*/
const config = {
livereload: false,
build: true,
useLess: true,
buildFilter: (pathname) => /^(\.esbuild\/?(external|$)|css|favicon|index|src\/?(index|$)|$)/.test(pathname),
outputFilter: (pathname) => /^(css|favicon|index|static|$)/.test(pathname),
middlewares: [
// 对应文本支持简单ejs语法的服务端渲染,通常用来给资源链接加时间戳
{ middleware: 'template', test: /\.html?/ },
// 使用 esbuild 编译构建前端资源
{
middleware: 'esbuild',
test: /^\/?static\/bundle\b/,
watches: [/\.(tsx?|less)$/],
options,
},
],
output: require('path').join(__dirname, './output'),
};
module.exports = config;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/f2e-server/create-tabs-app.git
git@gitee.com:f2e-server/create-tabs-app.git
f2e-server
create-tabs-app
create-tabs-app
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385