Home

Issue: 2102

How to extract common mutations between modules?

[issue link]

I have some store modules that have some similar mutations .
So, I decide to extract it to mutations.js
But, I don’t know how to load it in nuxt.
simple import seems fail
Here’s the directories

store/
---common/
------mutations.js
---module1.js
---module2.js

Here’s how I import it in module1.js

import mutations from './common/mutations'
This question is available on Nuxt.js community (#c1863)