Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with nuxt #31

Open
haron-IV opened this issue Nov 4, 2020 · 4 comments
Open

Not working with nuxt #31

haron-IV opened this issue Nov 4, 2020 · 4 comments

Comments

@haron-IV
Copy link

haron-IV commented Nov 4, 2020

Hi.
I was trying to use composition helpers in Nuxt project, but if I import it inside the component whole application dead immediately.

Here is code that I wrote

import { createNamespacedHelpers } from 'vuex-composition-helpers'
const { useState } = createNamespacedHelpers('app')
setup() {
const { getApplicationWidth } = useState([
      'appWidth'
])
}
@davidmeirlevy
Copy link
Contributor

Have you implemented the change in the nuxt.config.js like mentioned in the documentation?

@haron-IV
Copy link
Author

haron-IV commented Nov 8, 2020

U mean about this section?

module.exports = {
  ...
  chainWebpack: config => {
    config
      .rule('ts')
      .include
      .add(/vuex-composition-helpers/)
  }
}

@davidmeirlevy
Copy link
Contributor

@venglas look here at line 72:

https://github.com/greenpress/blog-front/blob/master/nuxt.config.js

@dschreij
Copy link

I think you specifically refer to adding the following segment to nuxt.config.js?

build: {
    transpile: [
      'vuex-composition-helpers'
    ]
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants