Skip to main content

Build project

MonsterJS CLI provides a command to compile the project for deployment. The output of this build process is found in ./build directory by default but can be changed based on the options when running the cli command to build the project.

Build command

To build the project we can run the following command:

mn build

Command options

OptionDescriptionValue typeDefault
--env <value>Build the project using the specified environment.stringdev
--mode <value>Build the project in 'development', 'production', or 'none' mode. See webpack mode for more info about the different modes.stringdevelopment
--output <value>The directory where it should output the bundles, assets and other files.stringdist


mn build --env prod