Skip to content

(Feature) Allow customization of output paths/chunk names/output folder structure #5171

@PEsteves8

Description

@PEsteves8

My current use case is about preventing the server from downloading certain files if certain criteria isn't met. Since anyone can disable guards on the client side, usually I have a folder called for instance 'abc', whose files are only downloadable by authd users, and another one called 'def', whose files are only accessed by admins. The check is made within the server config and the files will be allowed to be downloaded or not.

So I can think of 3 ways that would allow me to do something similar:

  • Allow to group specific chunks within specific folders. I could use an option indicating that several chunks should end up in a specific folder in the ouput dir. This could mean something like specifying path strings to lazy loaded modules (just like in the router config) and defining an ouput dir for them. Or doing something similar at folder level.

  • Allow named chunks. I really like the hashing, but the numbering prevents me from identifying the modules. By naming them I could use a name prefix to identify the type of the file. This is already being requested and probably would be the simpler way. Although, specifically for me I would rather group files.

  • Do the normal bundling process but give an option to keep the folder structure from the development src/app folder (or even from the entire src folder). That would mean way less bundling (it would mostly happen among the angular library and other 3rd party libraries). I could also mean just doing the aot compilation, without bundling at all. A variant of this would be to keep the folder structure exclusively for lazy loaded modules. But that would probably be to specific of an option.

Maybe all this doesn't really make much sense, and there might be a better solution not even related to the cli, or maybe there might be a totally different approach for my issue, but I felt like I should discuss it first. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions