Extends
多文件内容合并
在前端,为了减少浏览器请求个数,会通过合并多个小文件来优化浏览器加载的速度。我们可以把静态文件托管到对象存储,在 Malagu 框架中通过内网加载对象存储中的多个文件合并后返回给前端浏览器。
快速开始
Malagu 框架提供了命令行模板,我们可以通过 malagu init
命令快速创建一个多文件内容合并项目。选择如下模板:
➜ test malagu init
___
/'\_/`\ /\_ \
/\ \ __ \//\ \ __ __ __ __
\ \ \__\ \ /'__`\ \ \ \ /'__`\ /'_ `\/\ \/\ \
\ \ \_/\ \/\ \L\.\_ \_\ \_/\ \L\.\_/\ \L\ \ \ \_\ \
\ \_\\ \_\ \__/.\_\/\____\ \__/.\_\ \____ \ \____/
\/_/ \/_/\/__/\/_/\/____/\/__/\/_/\/___L\ \/___/
/\____/
@malagu/cli@2.30.0 \_/__/
╭──────────────────────────────────────────────────╮
│ Serverless First Development Framework │
╰──────────────────────────────────────────────────╯
? Select a template to init
accounts Official
schedule Official
admin-app Official
microservice Official
standalone-app Official
❯ file-service Official
puppeteer Official
mycli Official
backend-app Official
sample-app Official
malagu-component Official
nest-app Official
(Move up and down to reveal more choices)