grunt-cli
grunt-cli copied to clipboard
Can't have command-line argument "--module" in Node 12
Some of my Grunt tasks take a "--module=..." argument. Under Node 8.15.0, things work fine:
$ grunt --hello=asdf
Warning: Task "default" not found. Use --force to continue.
Aborted due to warnings.
$ grunt --module=asdf
Warning: Task "default" not found. Use --force to continue.
Under Node 10 and above, something goes wrong when I use "--module=...".
$ grunt --hello=asdf
Warning: Task "default" not found. Use --force to continue.
Aborted due to warnings.
$ grunt --module=asdf
/Users/kannan/.nodenv/versions/10.17.0/bin/node: bad option: --module=asdf
The problem can't be solved by grunt I guess, as --module is an option in node itself.
--module execute a file as a JavaScript module. Note: the --module option is implicitly enabled for *.mjs files.