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

Windows平台下运行报错 #40

Open
astonishqft opened this issue May 6, 2019 · 0 comments
Open

Windows平台下运行报错 #40

astonishqft opened this issue May 6, 2019 · 0 comments

Comments

@astonishqft
Copy link

1
在windows平台下执行npm run dev会报错,看了下.umi下的umi.js文件:
2
生成的路径不能识别,应该是node中处理windows和linux的路径分隔符不同导致的。
暂时先将umi-plugin-entry.js插件里面的
api.modifyEntryRender(memo => { memo = const rootContainer = window.g_plugins.apply('rootContainer', {
initialValue: React.createElement(require('${join(__dirname, "./redux/index")}').default,
null,
React.createElement(require('./router').default),),
});替换成了相对路径:api.modifyEntryRender(memo => {
memo = const rootContainer = window.g_plugins.apply('rootContainer', { initialValue: React.createElement(require("../../redux/index").default, null, React.createElement(require('./router').default),), });

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

1 participant