vue-router

using vue-head with prerender-spa-plugin is causing title and meta tags to be displayed twice on netlify

流过昼夜 提交于 2019-12-24 11:54:03
问题 This issue only happens when live on netlify ( despite their prerender option turned off ), not while being served locally. the live site shows : <title>about | anonplayer about | anonplayer</title> title and meta tags are set using the vue-head package like so head: { title: { inner: "about | anonplayer", separator: ' ', }, ... and this happens for all routes of my single page app and also to meta tags where there are two sets of the tags I intended to have. looks like this I used the

Blank page and “Unknown name” error in vue.esm.js (Microsoft IE 11 and Microsoft Edge)

≡放荡痞女 提交于 2019-12-24 10:12:58
问题 Internet Explorer 11 and Microsoft Edge shows me a blank page when loading my Vue app. Console logs shows an "Unknown name" error pointing to the line "throw e" in vue.esm.js: Watcher.prototype.get = function get () { pushTarget(this); var value; var vm = this.vm; try { value = this.getter.call(vm, vm); } catch (e) { if (this.user) { handleError(e,vm, ("getter for watcher \"" + (this.expression) + "\"")); } else { throw e // UNKNOWN NAME ERROR (IE and Edge) } } finally { // "touch every

Correct way to install custom VueJs Plugin

爷,独闯天下 提交于 2019-12-24 09:49:38
问题 Im creating a custom plugin that encapsulates a bunch of authentication functionality with vuex and vue-authenticate. The problem im having is figuring out the correct way to load and install the module into VueJS, im not sure if its my webpack or vuejs knowledge that is lacking but so far I have the following /node_modules/plugin/index.js import Vue from 'vue' import Vuex from 'vuex' import routes from './routes' import store from './vuex/store' import EventBus from './bus/eventBus' import

CSRF Token Duplication on Vue Router Laravel 5.3 Vue 2 JS

元气小坏坏 提交于 2019-12-24 09:39:58
问题 So my problems is that the session token is generated. and the token that i've sent via AJAX or AXIOS (cause im using vue and vue router for fetching API) is getting a mismatch This is the response i got when posting data The ajax token is equal to the token in the meta tag of the main blade template using this tag Meta Tag in app.blade.php <meta name="csrf-token" content="{{ csrf_token() }}"> <script> window.Laravel = <?php echo json_encode([ 'csrfToken' => csrf_token(), ]); ?> </script>

Vue.js router history mode with ServiceStack routing fallback and Api prefix

℡╲_俬逩灬. 提交于 2019-12-24 09:23:51
问题 Every client side route starts with a hash. How can I enable History Mode in Vue Router without disturbing the api routing? Also I would prefer not to have to start my routes with "/api". Client side routing didnt work with Config.HandlerFactoryPath set to "api". Is there a way to achieve it? APPHOST public class AppHost : AppHostBase { private BackendSettings _settings; private IHostingEnvironment _environment; public AppHost(BackendSettings settings, IHostingEnvironment environment) : base(

Vue-router doesn't remove hashbang after building for production

ぃ、小莉子 提交于 2019-12-24 07:14:43
问题 I was trying to remove the hashbang and I did it by adding mode:'history' in the index file of vue-router: export default new Router({ mode: 'history', routes: [ { path: '/', name: 'Daksh', component: Daksh }, { path: '/about', name: 'About', component: About }, { path: '/work', name: 'Work', component: Work } ] }) Then It was working well when I tried it in the hot reload mode but after running npm run build , It stopped working for some weird reason. Please Help :) 回答1: As the answer has

Vue-router doesn't remove hashbang after building for production

。_饼干妹妹 提交于 2019-12-24 07:14:14
问题 I was trying to remove the hashbang and I did it by adding mode:'history' in the index file of vue-router: export default new Router({ mode: 'history', routes: [ { path: '/', name: 'Daksh', component: Daksh }, { path: '/about', name: 'About', component: About }, { path: '/work', name: 'Work', component: Work } ] }) Then It was working well when I tried it in the hot reload mode but after running npm run build , It stopped working for some weird reason. Please Help :) 回答1: As the answer has

VueJs 2, NodeJs and reload page

丶灬走出姿态 提交于 2019-12-24 07:07:50
问题 I have a question with VueJs and the refreshing page. When I refresh my VueJs app with specific URL (for example : /tag/1), an error occurs : "Uncaught SyntaxError: Unexpected token <". My server is created with NodeJs and I use ExpressJs. My templating engine is EJS. I have defined a route : app.get('*', (request, response) => { response.render('layouts/index') }) In the documentation for ExpressJs, it's possible to use a plugin "connect-history-api-fallback" to replace ".htaccess" of Apache

In Vue, how to include .htaccess to production using npm run build?

懵懂的女人 提交于 2019-12-24 04:22:03
问题 I'm using Vue CLI 3 and vue-router mode history and had this problem. Found out that after I run npm run build , I need to put .htaccess inside the dist folder. How to make npm run build to automatically include the .htaccess so that I don't need to manually copy it into dist folder? 回答1: It might sound obvious, but placing the .htaccess inside the public folder seems to do the trick for me. Everything contained in public folder is copied as is to dist folder during build. 来源: https:/

vue-router.esm.js?fe87:16 [vue-router] Route with name 'page' does not exist

只谈情不闲聊 提交于 2019-12-24 02:08:26
本文地址: http://www.cnblogs.com/veinyin/p/7910525.html 我的路由配置 1 { 2 path: '/page', 3 name: page, 4 component: page 5 } 我的 router-link <router-link :to="{name:'page',params:{trans:'ahahahaha'}}">page</router-link> 出现问题原因,没有给 name 的值用引号引起来,因为这是个字符串,而不是一个变量。 如果直接写,系统查找不到 page 这个变量,所以出错。 那么解决方案很简单呀,给个引号就行了 1 { 2 path: '/page', 3 name: 'page', 4 component: page 5 } END~~~≥ω≤ 来源: https://www.cnblogs.com/veinyin/p/7910525.html