The service cannot be started due to custom parameters passed by npm run dev

the development environment needs to do some operations according to some input parameters, but the parameters passed in by npm run dev will be treated as internal parameters of webpack; the parameters can be obtained through process.argv, but the service will not be started. The relevant screenshot is as follows:

package.json screenshot

clipboard.png

clipboard.png

Feb.23,2022

the parameters passed in will be treated as internal parameters of webpack

replace dev with something like -- custom-env=dev , and let webpack recognize it as an option parameter, so that it will not be internally treated as a specific parameter

.

has the problem of landlord been solved? I tried, but it didn't work.

Menu