Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routes[path] is not a constructor #4

Open
kx59717 opened this issue Feb 17, 2017 · 2 comments
Open

routes[path] is not a constructor #4

kx59717 opened this issue Feb 17, 2017 · 2 comments

Comments

@kx59717
Copy link

kx59717 commented Feb 17, 2017

webpack-in-action/examples/simple/src/index.js
运行时无论是谷歌还是火狐都报routes[path] is not a constructor这个错,在index.js 37行

@kx59717
Copy link
Author

kx59717 commented Feb 17, 2017

对自己无语,本来应该是打开http://localhost:8100/foo 我打开的是http://localhost:8100/ 不好意思打扰了

@kx59717 kx59717 closed this as completed Feb 17, 2017
@jiangfengming jiangfengming reopened this Mar 6, 2017
@escapiststupor
Copy link

我在作為範本的 simple/src/index.html的body裡面加入一個header element

打开 http://localhost:8100/ 时 有看到header element 报routes[path] is not a constructor这个错+1
如果訪問 http://localhost:8100/dummy 雖然那個header element也有出現 卻還是报routes[path] is not a constructor这个錯
很想知道為什麼會有這樣的錯出現

另外
在訪問 /foo 和 /bar 時 那個header element就消失了
如果我有一些共用組件 比如說一個華麗的header 或是nav element 希望foo跟bar可以共用
要如何讓他們可以出現在 /foo 和 /bar?
是否只能使用import的方法?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants