Skip to content

Commit da325a0

Browse files
committed
Update plugin for store
Related to vue cli v4 and the use of @vue/cli-plugin-vuex
1 parent a51f909 commit da325a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

generator/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ module.exports = async (api, options, rootOptions) => {
311311
try {
312312
// move store.js file from ./src to ./app
313313
if (api.hasPlugin('vuex')) {
314-
fs.moveSync('./src/store' + genConfig.jsOrTs, genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'store' + genConfig.jsOrTs, {
314+
fs.moveSync('./src/store/index' + genConfig.jsOrTs, genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'store/index' + genConfig.jsOrTs, {
315315
overwrite: true
316316
});
317317
}
@@ -352,7 +352,7 @@ module.exports = async (api, options, rootOptions) => {
352352
if (options.isNativeOnly) {
353353
// move store.js file from ./src to ./ns-example/app
354354
if (api.hasPlugin('vuex')) {
355-
fs.copy('./src/store' + genConfig.jsOrTs, genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'store' + genConfig.jsOrTs, (err) => {
355+
fs.copy('./src/store/index' + genConfig.jsOrTs, genConfig.dirPathPrefix + genConfig.nativeAppPathModifier + 'store/index' + genConfig.jsOrTs, (err) => {
356356
if (err) throw err;
357357
});
358358
}

0 commit comments

Comments
 (0)