Skip to content

fix(@angular-devkit/build-angular): do not generate an index.html file in the browser directory when using SSR.#27443

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
alan-agius4:index.html
Apr 10, 2024
Merged

fix(@angular-devkit/build-angular): do not generate an index.html file in the browser directory when using SSR.#27443
alan-agius4 merged 1 commit intoangular:mainfrom
alan-agius4:index.html

Conversation

@alan-agius4
Copy link
Copy Markdown
Collaborator

BREAKING CHANGE: By default, the index.html file is no longer emitted in the browser directory when using the application builder with SSR. Instead, an index.csr.html file is emitted. This change is implemented because in many cases server and cloud providers incorrectly treat the index.html file as a statically generated page. If you still require the old behavior, you can use the index option to specify the output file name.

"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputPath": "dist/my-app",
      "index": {
        "input": "src/index.html",
        "output": "index.html"
      }
    }
  }
}

@angular-robot angular-robot bot added the detected: breaking change PR contains a commit with a breaking change label Apr 10, 2024
@alan-agius4 alan-agius4 force-pushed the index.html branch 2 times, most recently from 596b2bf to ee9d4dd Compare April 10, 2024 09:09
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release labels Apr 10, 2024
@alan-agius4 alan-agius4 requested a review from clydin April 10, 2024 09:09
…ile in the browser directory when using SSR.

BREAKING CHANGE: By default, the index.html file is no longer emitted in the browser directory when using the application builder with SSR. Instead, an index.csr.html file is emitted. This change is implemented because in many cases server and cloud providers incorrectly treat the index.html file as a statically generated page. If you still require the old behavior, you can use the `index` option to specify the `output` file name.

```json
"architect": {
  "build": {
    "builder": "@angular-devkit/build-angular:application",
    "options": {
      "outputPath": "dist/my-app",
      "index": {
        "input": "src/index.html",
        "output": "index.html"
      }
    }
  }
}
```
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Apr 10, 2024
@alan-agius4 alan-agius4 merged commit 2acf95a into angular:main Apr 10, 2024
@alan-agius4 alan-agius4 deleted the index.html branch April 10, 2024 15:00
@angular-automatic-lock-bot
Copy link
Copy Markdown

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 May 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker detected: breaking change PR contains a commit with a breaking change target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants