process.argv shows empty for babel transpiled codes

210 views Asked by At

I am trying to achieve es2015 features on "node version 8.4.0". That's why I am using babel to transpile my es6 to node compatible code.
I am trying to run node bundle.js arguments and using process.argv returns an empty array. where running node index.js arguments gives the arguments list.

Using docker: Linux 37901bca5bc7 4.10.0-041000-generic #201702191831 SMP Sun Feb 19 23:33:19 UTC 2017 x86_64 GNU/Linux
Node packages: "babel-core": "^6.23.1", "babel-loader": "^6.2.10", "babel-preset-es2015": "^6.22.0", "babel-preset-stage-2": "^6.22.0", To bundle the code I am using webpack. Thanks in advance.

0

There are 0 answers