Build commands
Last updated
Was this helpful?
Last updated
Was this helpful?
These commands will allow you to generate the code that can be used to run or analyze a Frontity project
When you do you generate a build
folder with several files.
You'll get something similar to this:
The most important file for deployments in any hosting is server.js
, which is actually a middleware that can be inserted in a custom web server.
npx frontity serve
So, easy way of executing a Frontity project in any Node.js server:
Launch remotely npx frontity build
to generate the build
folder.
Launch remotely npx frontity serve
to launch a web server that makes use of the server.js
generated in the previous step.
server.js
as a middlewareWhen doing npx frontity build
you get a build
folder in the root of your project.
This report shows you the modules included on each bundle and the size of each one, so that you can analyze them and maybe decide using other modules (or not including a specific module at all) to reduce the size of the final bundle.
You can directly execute this server.js
by using the command .
You can also use this generated server.js
as part of a custom server like it's mentioned .
Frontity generates some reports automatically by using .
Inside that build
folder there is a .html
file generated at analyze/module-development.html
. This file is a visual report in the form of a tree generated by .