Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI, add option to change out "index.js" default name. #539

Open
lgxm3z opened this issue May 13, 2020 · 4 comments · May be fixed by #643
Open

CLI, add option to change out "index.js" default name. #539

lgxm3z opened this issue May 13, 2020 · 4 comments · May be fixed by #643
Labels
enhancement New feature or request

Comments

@lgxm3z
Copy link

lgxm3z commented May 13, 2020

Just like #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 would be essential 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 to have this option natively in the cli as '--filename' for example.

@Prinzhorn
Copy link

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).

@MaximDevoir MaximDevoir linked a pull request Jan 13, 2021 that will close this issue
@styfle styfle added the enhancement New feature or request label Jun 22, 2021
@frank-dspeed
Copy link

i my self create in that situation a build-src folder that simply contains symbolic links then i run ncc over that files and get the desired output while maintaining a single real source file and i maintain no additional code.

@frank-dspeed
Copy link

i found out that maybe -a, --asset-builds Build nested JS assets recursively, useful for
when code is loaded as an asset eg for workers. is the solution for that

@ttodua
Copy link

ttodua commented Apr 9, 2024

definitely needed feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants