electron + vue2.0 + webpack + vue-router 打包项目后,路由无效?
electron + vue2.0 + webpack + vue-router 打包项目后,以index.html/login 这样的形式访问不了路由,在开发模式下,用http:localhost:8080/login这样是可以的。我也找过一些资料,问过一些群的朋友,说是要建立web服务,但是electron下建web服务也不知道怎么搞,求大神指导下。。感激不尽!!
electron 入口代码:
mainWindow.loadURL(url.format({
/*开发环境
pathname: path.join('localhost:8080'),
protocol: 'http:',
slashes: true
*/
/*生产环境*/
pathname: path.join(__dirname, '/xpg/index.html'),
protocol: 'file:',
slashes: true
}))
main.js代码
import Vue from 'vue'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
import 'ionicons/css/ionicons.min.css'
impo