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

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

Closed
crysislinux opened this issue Nov 9, 2022 · 4 comments · Fixed by #24233
Closed

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

crysislinux opened this issue Nov 9, 2022 · 4 comments · Fixed by #24233
Labels
area: @angular-devkit/build-angular devkit/build-angular:server feature: votes required Feature request which is currently still in the voting phase feature Issue that requests a new feature

Comments

@crysislinux
Copy link

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.
@alan-agius4
Copy link
Collaborator

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

@crysislinux
Copy link
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).

@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Nov 9, 2022
@angular-robot
Copy link
Contributor

angular-robot bot commented Nov 9, 2022

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.

alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
alan-agius4 added a commit to alan-agius4/angular-cli that referenced this issue Nov 15, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes angular#24203
dgp1130 pushed a commit that referenced this issue Nov 18, 2022
…ilder

This commits adds the `assets` option to the server builder. This can be useful to copy server specific assets such as config files.

Closes #24203
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Dec 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular-devkit/build-angular devkit/build-angular:server feature: votes required Feature request which is currently still in the voting phase feature Issue that requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants