Ask for advice! How to configure jenkins build to pass parameters to js

there are three development environments for pc-side projects (dev/test/prod), and there are three jenkins projects. How to configure jenkins to pass parameters to js when building


if you are asking about environment variables, it is recommended that each system add environment variables with the same name, such as ENV=test. Js can be compiled with environment parameters, such as

.
project_path=$(cd `dirname $0`; pwd)

export NODE_ENV=$ENV

./node_modules/.bin/webpack --config webpack.dll.config -p
./node_modules/.bin/webpack --config webpack.config -p

here you can export environment variables directly to the js compilation environment.
then you can judge happily in the program


module.exports = {
    API_URL:process.env.NODE_ENV == "production" ? "http://XXXX/api/":"http://AAAA/api/",
    IMAGE_URL:process.env.NODE_ENV == "production" ?  "http://XXXXX": "http://AAAA"
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b384e3-2c0f7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b384e3-2c0f7.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?