Ncc: CLI, add option to change out "index.js" default name.

Created on 13 May 2020  路  1Comment  路  Source: vercel/ncc

Just like https://github.com/zeit/ncc/issues/492 did, I would like to suggest an option to change the default name of the output file after running the command line. Apparently you can change the name of the folder and that's cool but in some situations, like working with pm2 for example, it is cool to have different names for each application than having several "index" in a large list. Currently I've created my own script to perform a simple task of renaming the index.js file after transpilation to any name I want, but it would be very interesting and essential to have this option natively in the cli as `--filename' for example.

Most helpful comment

Here's another use-case: I want to bundle both main.ts and preload.ts in an Electron app (for faster launch time). Having both renamed to index.js doesn't make sense in this case. An option would save two && mv dist/index.js dist/preload.js (which is not even cross platform).

>All comments

Here's another use-case: I want to bundle both main.ts and preload.ts in an Electron app (for faster launch time). Having both renamed to index.js doesn't make sense in this case. An option would save two && mv dist/index.js dist/preload.js (which is not even cross platform).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rauchg picture rauchg  路  3Comments

tomakado picture tomakado  路  4Comments

benseitz picture benseitz  路  5Comments

rauchg picture rauchg  路  3Comments

andykais picture andykais  路  4Comments