Skip to content

Commit 39125f4

Browse files
committed
[skip ci] generator: warn about history mode if router is installed
1 parent f23664e commit 39125f4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

generator/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ module.exports = (api, options = {}) => {
5050
'let mainWindow: any'
5151
)
5252
fs.writeFileSync(api.resolve('./src/background.ts'), background)
53+
if (api.hasPlugin('router')) {
54+
console.log('\n')
55+
require('@vue/cli-shared-utils/lib/logger').warn(
56+
'It is detected that you are using Vue Router. If you are using history mode, you must push the default route when the root component is loaded. Learn more at http://shorturl.at/lsBEH.'
57+
)
58+
}
5359
}
5460
})
5561

0 commit comments

Comments
 (0)