This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
build: { | |
// Remove hash from build files | |
filenames: { | |
css: 'common.css', | |
manifest: 'manifest.js', | |
vendor: 'common.js', | |
app: 'app.js', | |
chunk: '[name].js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function check (DELAY_MINUTE = 1, RESPONSE_CODE = 200) { | |
var req = new XMLHttpRequest() | |
req.addEventListener('load', onLoad) | |
function open () { | |
req.open('HEAD', location.href, true) | |
req.send() | |
} | |
function onLoad () { | |
req.status === RESPONSE_CODE ? notify() : setTimeout(open, DELAY_MINUTE * 60 * 1000) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.beforeEach((to, from, next) => { | |
const requiresAuth = to.matched.some(record => { | |
return record.meta.requiresAuth | |
}) | |
if (requiresAuth && !store.$data.isRegistered) { | |
next('/login') | |
} else { | |
next() | |
} | |
}) |
OlderNewer