# Aurelia-cli \>1.1.0 does not work with virtual directory anymore

**URL:** https://discourse.aurelia.io/t/aurelia-cli-1-1-0-does-not-work-with-virtual-directory-anymore/2928
**Category:** Help Requests
**Created:** [September 13, 2019, 12:05pm UTC](https://discourse.aurelia.io/t/aurelia-cli-1-1-0-does-not-work-with-virtual-directory-anymore/2928 "2019-09-13T12:05:49Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![vidriduch](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/vidriduch/32/675_2.png) [@vidriduch](https://discourse.aurelia.io/u/vidriduch)
#### Post date: [September 13, 2019, 12:05pm UTC](https://discourse.aurelia.io/t/aurelia-cli-1-1-0-does-not-work-with-virtual-directory-anymore/2928/1 "2019-09-13T12:05:49Z")

</div>

After upgrading to aurelia-cli 1.1.0 (same problem with 1.1.1) when I build a dist and try to run it from IIS virtual folder, aurelia won’t load scripts from correct path _192.168.1.2/testapp_ but from _192.168.1.2_ only. It does not respect the virtual directory settings in webpack.config.js.  
Before I would just do:

```
publicPath: production ? '/testapp/' : '/'

```

and all would jsut work, but doing the same not makes not difference. Any ideas what am i doing wrong?

---

<div class="post-metadata">

### Author: ![huochunpeng](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@huochunpeng](https://discourse.aurelia.io/u/huochunpeng)
#### Post date: [September 15, 2019, 12:16am UTC](https://discourse.aurelia.io/t/aurelia-cli-1-1-0-does-not-work-with-virtual-directory-anymore/2928/2 "2019-09-15T00:16:42Z")

</div>

Not sure how you did before, but you need to modify one more to match the path.

```auto
new HtmlWebpackPlugin({
      template: 'index.ejs',
      metadata: {
        // available in index.ejs //
        title, baseUrl: production ? '/testapp/' : '/'
      }
    }),

```

---

<div class="post-metadata">

### Author: ![vidriduch](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/vidriduch/32/675_2.png) [@vidriduch](https://discourse.aurelia.io/u/vidriduch)
#### Post date: [September 16, 2019, 7:39am UTC](https://discourse.aurelia.io/t/aurelia-cli-1-1-0-does-not-work-with-virtual-directory-anymore/2928/3 "2019-09-16T07:39:09Z")

</div>

I’m setting both

```
output: {
    path: outDir,
    publicPath: production ? '/testApp/' : '/',
    filename: production ? '[name].[chunkhash].bundle.js' : '[name].[hash].bundle.js',
    sourceMapFilename: production ? '[name].[chunkhash].bundle.map' : '[name].[hash].bundle.map',
    chunkFilename: production ? '[name].[chunkhash].chunk.js' : '[name].[hash].chunk.js'
  },

```

and

```
new HtmlWebpackPlugin({
      template: 'index.ejs',
      minify: production ? {
        removeComments: true,
        collapseWhitespace: true
      } : undefined,
      metadata: {
        // available in index.ejs //
        //title, baseUrl
        title, baseUrl: production ? '/testApp/' : '/'
      }

```

but the issue is still there. Still trying to load the scripts without accepting the virutal directory

`http://192.168.1.2/runtime~app.25b3df30356ba1400fa2.bundle.js`

---

<div class="post-metadata">

### Author: ![vidriduch](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/vidriduch/32/675_2.png) [@vidriduch](https://discourse.aurelia.io/u/vidriduch)
#### Post date: [September 16, 2019, 7:59am UTC](https://discourse.aurelia.io/t/aurelia-cli-1-1-0-does-not-work-with-virtual-directory-anymore/2928/4 "2019-09-16T07:59:12Z")

</div>

I have found the problem. After re-reading the README.md and run

```
npm run build

```

it all build fine. I t look like the old

```
au build --env prod

```

no longer works ☹

---

<div class="post-metadata">

### Author: ![huochunpeng](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@huochunpeng](https://discourse.aurelia.io/u/huochunpeng)
#### Post date: [September 16, 2019, 10:26am UTC](https://discourse.aurelia.io/t/aurelia-cli-1-1-0-does-not-work-with-virtual-directory-anymore/2928/5 "2019-09-16T10:26:55Z")

</div>

I see. The fix was on the way 🙂

> <https://github.com/aurelia/cli/pull/1148>

---

<div class="post-metadata">

### Author: ![huochunpeng](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@huochunpeng](https://discourse.aurelia.io/u/huochunpeng)
#### Post date: [September 20, 2019, 1:00am UTC](https://discourse.aurelia.io/t/aurelia-cli-1-1-0-does-not-work-with-virtual-directory-anymore/2928/6 "2019-09-20T01:00:55Z")

</div>

FYI, cli v1.2.0 now supports `au build --env prod`.

---

<div class="post-metadata">

### Author: ![vidriduch](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/vidriduch/32/675_2.png) [@vidriduch](https://discourse.aurelia.io/u/vidriduch)
#### Post date: [September 20, 2019, 7:22am UTC](https://discourse.aurelia.io/t/aurelia-cli-1-1-0-does-not-work-with-virtual-directory-anymore/2928/7 "2019-09-20T07:22:10Z")

</div>

updated, thank you.  
I wonder if this was intentional or accidental change 🙂

---

<div class="post-metadata">

### Author: ![huochunpeng](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@huochunpeng](https://discourse.aurelia.io/u/huochunpeng)
#### Post date: [September 20, 2019, 7:52am UTC](https://discourse.aurelia.io/t/aurelia-cli-1-1-0-does-not-work-with-virtual-directory-anymore/2928/8 "2019-09-20T07:52:52Z")

</div>

It was an unintentional breaking change due to the big refactoring.
