How to pass parameters to aurelia tasks

Hi guys,

I want to increase the default memory of node and it seems to be some commands like the following:

node SomeScript.js --max-old-space-size=8192

However, since we want to integrate with aurelia-cli and use the au build-plugin --max-old-space-size 8192, for instance, I have no idea how to do that, and whether it’s possible or not? I read this but to no avail. any solutions?

Thanks in advance.

cc: @huochunpeng

2 Likes

There is no way to implement that option in cli. Because that option is for nodejs, cli code is executed after nodejs warms up.

To set options for nodejs, you can set env variable https://nodejs.org/dist/latest-v10.x/docs/api/cli.html#cli_node_options_options

3 Likes

Thanks @huochunpeng

I used like the following:

// omitted code
"scripts": {
    "start": "nps",
    "test": "nps test",
    "build:plugins": "NODE_OPTIONS=--max-old-space-size=4096 au build-plugin",
}
// omitted code
3 Likes