Static GitHub Issues

[1120] Can't import/require store from plugin

prev: ERR_INCOMPLETE_CHUNKED_ENCODING
next: Come back to nuxt-view and nuxt-child

In ~plugins/test.js:

import store from '~store'
const store2 = require('~store')

console.log(store)
console.log(store2)

output:

screen shot 2017-07-19 at 19 44 04

How I can access store from plugin or any other place that is not a component/page/layout?
Note: exactly the same happens with '~router'.

Nuxt 1.0.0-alpha.4

According to docs it should work:

screen shot 2017-07-19 at 19 48 37

<!--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/c978">#c978</a>)</em></sub></div>