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

可以在webpack中使用么? #41

Open
wweggplant opened this issue Oct 24, 2017 · 1 comment
Open

可以在webpack中使用么? #41

wweggplant opened this issue Oct 24, 2017 · 1 comment

Comments

@wweggplant
Copy link

使用webpack开发,工具提示找不到Regular实例
主要代码如下:

import App from "./App";
import router  from "./router";
import restate   from "regular-state";

new App({
    data: {username: "leeluolee"}
}).$inject('#app');
restate()
    .state(router.routes) //完成路由节点注册
    .start({ html5: true ,view: document.getElementById('app')}); // 启动路由
```
@zxc0328
Copy link
Member

zxc0328 commented Oct 25, 2017

可以的。只要你使用了Regular v0.5.0+。

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

2 participants