Skip to content

ng build - Add option to save bundled js files in different directory and index in different directory #2688

Closed
@naveedahmed1

Description

@naveedahmed1

Here is a feature request.

When we build a project using ng build command, it creates a folder dist and place all bundles and index file in it. I know that we can specify the outdir in angular-cli.json and cli will generate all bundles and index.html file in the specified folder.

What if there is a need to put the bundled js files in a separate directory and index file in separate directory e.g

bundled js in
/dist/js/ folder

and index file in
/dist/ folder

I tried, copying the generated js bundles to the dist/js folder and updated the paths in index file but it didn't work and console shows 404 error for bundles.

It would be good to add an option to specify path for the bundled js files and index file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions