2016-03-03 28 views
0

我創建應用程序電子,瀏覽器是好的,但環境電子不同意路由路由。在附件I中發送整個屏幕。請指教。 code and electron app在電子應用程序中路由Reactjs

+0

什麼版本的react-router是那個?我在2.0.1上遇到了同樣的問題。我繞過它的方式是使用哈希歷史記錄。無論如何,你並沒有針對任何SEO工具。 – backman

+0

你能解決這個問題嗎?我也有這個問題,下面給出的解決方案是行不通的。 –

回答

0

我發現要做到這一點的最好辦法是用最少的努力就可以使用path.join,這對你是否真的有幫助?

# IMPORT PATH ES6/7 

# es6: const path = require('path'); 

# CONSTRUCT YOUR BUILD PATH 
const build_path = path.join(__dirname), '/build'); 

# mainWindow.loadURL('file://' + build_path + '/index.html') 

console.log('file://' + build_path + '/index.html'); 
# -> file://build/index.html 
相關問題