Static GitHub Issues

[2983] [BUG] build.watch doesn't handle `~`

prev: pages目录下的页面都会被路由访问到?如何避免非路由的页面
next: Multiple dynamic routes on same level impossible with Nuxt?

Hi, if I watch a file by this way:

build: {
        watch: [
            '~/.env',
        ]
    },

the build will not reload.

If I do:

build: {
        watch: [
            resolve(process.cwd(), '.env')
        ]
    },

it works!

I'll maybe make a PR, if I have time to.

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c2586">#c2586</a>)</em></sub></div>