build
Generate code ready for production deployment.
Tuya MiniApp IDE automate build execution
Tuya MiniApp IDE can be configured to automatically execute build when packaging, eliminating the need to manually execute 'ray build' from the console. Configure devMode: ray in project.tuya.json to associate ray build when uploading a project.
Command description
ray build ./my-app
Note:
my-appindicates the directory where the project is located.
Options
source
The source code directory of the project. Default value: src.
output
The output directory.
mini
After mini is enabled, the generated files are compressed to a certain extent, and a certain amount of compilation time is consumed. Due to limitations by the Tuya MiniApp IDE, the files can meet the upload requirements after compression is enabled. By default, mini is enabled in build mode.
Important: Compression in
devmode is not equivalent to that inbuildmode, and the actual application size depends on thebuildresult.
no-mini
Disable the compression of the output files.
target
The target platform. Valid values: web, wechat, tuya, ios, and android.
analyze
Enable the visualized analytics method analyze. For more information, see Webpack Bundle Analyzer.
type
The build type. Valid values: app and component.
transform-mode
The conversion type of a component. It is valid only when the type is component. Valid values: auto and pure.