# Ionic build generates index.html at the wrong place

**URL:** <https://forum.ionicframework.com/t/ionic-build-generates-index-html-at-the-wrong-place/245789>\
**Category:** Ionic Framework\
**Created:** [December 24, 2024, 9:39am UTC](https://forum.ionicframework.com/t/ionic-build-generates-index-html-at-the-wrong-place/245789 "2024-12-24T09:39:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jl2035](https://avatars.discourse-cdn.com/v4/letter/j/a9a28c/32.png) [@jl2035](https://forum.ionicframework.com/u/jl2035)\
**Post date:** [December 24, 2024, 9:39am UTC](https://forum.ionicframework.com/t/ionic-build-generates-index-html-at-the-wrong-place/245789/1 "2024-12-24T09:39:24Z")

</div>

Hi, newby here.

When I execute “ionic build” the output gets generated under www/browser. I would like to get the output under www instead.

These are my options inside angular.json:

```auto
         "options": {
            "outputPath": "www",
            "index": "src/index.html",
            "polyfills": [
              "src/polyfills.ts"
            ],
            "tsConfig": "tsconfig.app.json",
            "inlineStyleLanguage": "scss",
            "assets": [
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "assets"
              }
            ],
            "styles": ["src/global.scss", "src/theme/variables.scss"],
            "scripts": [],
            "browser": "src/main.ts"
          },

```

And this is my capacitor.config.ts file (not sure if this is relevant):

```auto
import type { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  appId: 'io.ionic.starter',
  appName: 'myapp',
  webDir: 'www',
  bundledWebRuntime: false
};

export default config;

```

I don’t understand why the output gets into www/browser. Are there any other relevant settings that force the build to create this subdirectory?

---

<div class="post-metadata">

**Author:** ![RaulGM](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/raulgm/32/144112_2.png) [@RaulGM](https://forum.ionicframework.com/u/RaulGM)\
**Post date:** [April 7, 2025, 6:47pm UTC](https://forum.ionicframework.com/t/ionic-build-generates-index-html-at-the-wrong-place/245789/2 "2025-04-07T18:47:36Z")

</div>

Omg, I just ran into the same error. Have you solved it?

---

<div class="post-metadata">

**Author:** ![RaulGM](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/raulgm/32/144112_2.png) [@RaulGM](https://forum.ionicframework.com/u/RaulGM)\
**Post date:** [April 7, 2025, 7:07pm UTC](https://forum.ionicframework.com/t/ionic-build-generates-index-html-at-the-wrong-place/245789/3 "2025-04-07T19:07:09Z")

</div>

I fixed it by opening `capacitor.config.ts` and changing `webDir: 'www/browser'` That’s it. Fixed.
