Throw an error if client builds retain references to `*.server.ts` files

Open
#26,809 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
angular, typescript
Domain
build-system

Research direction

Start with the Angular CLI build command and trace how the final client build output is produced when SSR is enabled. Verify how .server.ts files are retained in that output; done means the build reports an error whenever such a file is present.

Written by the indexing model from the issue text.

Description

angular/build:application area: @angular-devkit/build-angular feature feature: under consideration
Command

build

Description

When SSR is enabled in an Angular project, there are a few .server.ts files produced (e.g. app.config.server.ts). The .server.ts suffix is also used by different applications as a way to structure and separate client and server code.

The proposal is to update the build pipeline to throw an error in case files with .server.ts suffix are present in the final client build output.

// cc @alan-agius4

Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
16h 35m
Merged PRs (30d)
176

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from angular/angular-cli

All issues in angular/angular-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.