Skip to content

Copy assets with @angular-devkit/build-angular:server #24203

Closed

Description

@crysislinux

Command

build

Description

@angular-devkit/build-angular:browser has the ability to copy assets with the assets array in the options.

But @angular-devkit/build-angular:server doesn't have the ability.

My use case is that we build the app with angular universal support, and we want to deploy both the client and server files together. We have some custom server files to be copied over (when building and serving). But since @angular-devkit/build-angular:server doesn't support that, we have to use some workarounds. The options we have currently are:

  1. use a custom script to do the job
  2. separate the server side rendering from the API server, so that we can use a different stack for the server code.

Describe the solution you'd like

Add the assets support to @angular-devkit/build-angular:server.

Describe alternatives you've considered

  1. use a custom script to do the job
  2. separate the server-side rendering from the API server, so that we can use a different stack for the server code. but we don't want to separate them at the beginning since it makes the deployment more complex.

Activity

  1. alan-agius4 commented on Nov 9, 2022

    @alan-agius4
    Collaborator

    As a workaround you can also copy the assets using the browser builder (@angular-devkit/build-angular:browser).

  2. added
    feature
    on Nov 9, 2022
  3. crysislinux commented on Nov 9, 2022

    @crysislinux
    Author

    @alan-agius4

    As a workaround you can also copy the assets using the browser builder (@angular-devkit/build-angular:browser).

    Thanks. That works but it's a bit strange if the client and server are in different directories (managed by nx for example).

  4. added
    feature: votes required
    on Nov 9, 2022
  5. angular-robot commented on Nov 9, 2022

    @angular-robot
    Contributor

    This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

    You can find more details about the feature request process in our documentation.

  6. added 11 commits that reference this issue on Nov 15, 2022
    b74abfd
    b2ef508
    a98998f
    affc5f9
    a588ce2
    62d809f
    cd7a0f8
    473ab0d
    89ee842
    8d9c79c
    f578361
  7. added a commit that references this issue on Nov 18, 2022
    c29df69
  8. angular-automatic-lock-bot commented on Dec 19, 2022

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. locked and limited conversation to collaborators on Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: @angular-devkit/build-angulardevkit/build-angular:serverfeaturefeature: votes required

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions