Could anyone provide some guidance on static build in NestJS? I’m looking to serve static files from a NestJS server and wondering if there’s a way to pre-build them. I’ve given @nestjs/serve-static a shot and even tried building it with webpack, but it seems to be stubbornly refusing to include SVGs in the final bundle. Any advice would be greatly appreciated!
#NestJS Static Build
7 messages · Page 1 of 1 (latest)
I'm not sure I follow the question
for example, I have an SVG file that I want to provide to the client upon request. But I need to change it in advance. I have a template that I want to read, modify and provide to the client.Bat for this I need a template in the final bundle (by defualt svg files do not get into the assembly)
I'm still not sure I understand what the issue is
I believe that is what the assets option of nest-cli.json is for
Documentation | NestJS - A progressive Node.js framework
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).
The documentation about this is quite unintuitively in the "monorepo" section, but I believe you're looking for this option