Not working with nuxt
haron-IV opened this issue · comments
Norah C. IV commented
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'
])
}
David Meir-Levy commented
Have you implemented the change in the nuxt.config.js like mentioned in the documentation?
Norah C. IV commented
U mean about this section?
module.exports = {
...
chainWebpack: config => {
config
.rule('ts')
.include
.add(/vuex-composition-helpers/)
}
}
David Meir-Levy commented
@venglas look here at line 72:
https://github.com/greenpress/blog-front/blob/master/nuxt.config.js
Daniel Schreij commented
I think you specifically refer to adding the following segment to nuxt.config.js?
build: {
transpile: [
'vuex-composition-helpers'
]
}