代码拉取完成,页面将自动刷新
// @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;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。