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

Migrate to roadhog@2 #542

Merged
merged 3 commits into from
Jan 5, 2018
Merged

Migrate to roadhog@2 #542

merged 3 commits into from
Jan 5, 2018

Conversation

sorrycc
Copy link
Contributor

@sorrycc sorrycc commented Jan 2, 2018

No description provided.

@chenshuai2144
Copy link
Collaborator

chenshuai2144 commented Jan 2, 2018

顺便解决一下 #524 吧...
来都来了

@sorrycc
Copy link
Contributor Author

sorrycc commented Jan 2, 2018

按页面动态 code splitting?用 umi 啊。

@chenshuai2144
Copy link
Collaborator

关掉code splitting...

@wunayou
Copy link
Contributor

wunayou commented Jan 2, 2018

我修改对应的文件 感觉。。。。 不对啊 自动eslint

@WhatAKitty
Copy link
Contributor

@wunayou 貌似体验保持了create-react-app一致,会在文件编译之前自动检查代码格式,并警告。

@wunayou
Copy link
Contributor

wunayou commented Jan 3, 2018

Line 1: Definition for rule 'jsx-a11y/href-no-hash' was not found jsx-a11y/href-no-hash 这个错误 好多啊

@yyjazsf
Copy link

yyjazsf commented Jan 3, 2018

@wunayou 因为使用的eslint 相关依赖版本不正确

(
  export PKG=eslint-config-airbnb;
  npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add -D "$PKG@latest"
)

@chenshuai2144
Copy link
Collaborator

chenshuai2144 commented Jan 5, 2018

这个大概什么时候能merge

@ddcat1115
Copy link
Contributor

@sorrycc 冲突解决下~

@sorrycc
Copy link
Contributor Author

sorrycc commented Jan 5, 2018

done

@ddcat1115 ddcat1115 merged commit c6cf634 into master Jan 5, 2018
@afc163 afc163 deleted the roadhog-2 branch January 5, 2018 06:35
@chenshuai2144
Copy link
Collaborator

chenshuai2144 commented Jan 5, 2018

.roadhogrc.mock.js 不起作用了

@afc163
Copy link
Member

afc163 commented Jan 5, 2018

@sorrycc

@sorrycc
Copy link
Contributor Author

sorrycc commented Jan 5, 2018

你们都无效吗?我试过可以的。

$ curl http://localhost:8000/api/currentUser
{"name":"Serati Ma","avatar":"https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png","userid":"00000001","notifyCount":12}

@afc163
Copy link
Member

afc163 commented Jan 5, 2018

我这里没问题。

@chenshuai2144
Copy link
Collaborator

chenshuai2144 commented Jan 5, 2018

image

发起请求
image

win10 64
node 8.7

@sorrycc
Copy link
Contributor Author

sorrycc commented Jan 5, 2018

手上没有 win 10 机器,帮忙定位下问题?mock 逻辑 2.0 的时候没有动过。

@chenshuai2144
Copy link
Collaborator

正在排查.....
程序员的玄学为啥我没改代码,还是跑不起来

@chenshuai2144
Copy link
Collaborator

chenshuai2144 commented Jan 5, 2018

额 我连debug都跑不起来

报错来自于
image

实在是不会调试 !!! win10 跑的跑的就跪了

@sorrycc
Copy link
Contributor Author

sorrycc commented Jan 6, 2018

修复了,试试 roadhog@2.0.5

@chenshuai2144
Copy link
Collaborator

ok了

@chenshuai2144
Copy link
Collaborator

@afc163 你直接提交给主分支吧?

@xiubug
Copy link

xiubug commented Jan 6, 2018

@sorrycc 升级版本2.0, 开发环境运行一直不成功!
提示信息:Cannot read property 'validate' of undefined 看了一下源码,也未找到什么文件下使用validate,请帮忙指点下!

@chenshuai2144
Copy link
Collaborator

你应该试试 2.0.5
@sosout 开发环境?

@xiubug
Copy link

xiubug commented Jan 6, 2018

@chenshuai2144 2.0.5 尝试了下也不行!

@xiubug
Copy link

xiubug commented Jan 6, 2018

@sorrycc @chenshuai2144 错误信息如下:

Build failed: Cannot read property 'validate' of undefined
TypeError: Cannot read property 'validate' of undefined
    at forEach.key (/Users/apple/jobs/reacts/react-antd-dva/node_modules/af-webpack/lib/getUserConfig/index.js:147:16)
    at Array.forEach (<anonymous>)
    at getUserConfig (/Users/apple/jobs/reacts/react-antd-dva/node_modules/af-webpack/lib/getUserConfig/index.js:131:30)
    at /Users/apple/jobs/reacts/react-antd-dva/node_modules/roadhog/lib/build.js:41:49
    at new Promise (<anonymous>)
    at new F (/Users/apple/jobs/reacts/react-antd-dva/node_modules/core-js/library/modules/_export.js:35:28)
    at _default (/Users/apple/jobs/reacts/react-antd-dva/node_modules/roadhog/lib/build.js:34:10)
    at Object.<anonymous> (/Users/apple/jobs/reacts/react-antd-dva/node_modules/roadhog/lib/scripts/build.js:9:20)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
[graceful-process#10592] exit with code:0

@sorrycc
Copy link
Contributor Author

sorrycc commented Jan 6, 2018

.webpackrc 或者 .webpackrc.js 发出来看下。

@xiubug
Copy link

xiubug commented Jan 6, 2018

@sorrycc Thanks!已解决!.webpackrc配置项autoprefixer没有修改。

@lichaoming1559731827
Copy link

./src/index.js
Module build failed: Error: Cannot find module 'babel-plugin-transform-runtime' from 'D:\svn\ympension-manage'

  • Did you mean "@babel/transform-runtime"?
    删除'babel-plugin-transform-runtime 就报这个错,不删除的话又会和roadhog2.0冲突
    怎么解决

@xiaoosnggao
Copy link

image
您好,我的 roadhog 始终安装不了,请问这个是什么原因呢

@jeekliang
Copy link

我修改对应的文

怎样关闭 编译前的 eslint 检查

@chenshuai2144
Copy link
Collaborator

@jeekliang 建议你fix 掉 eslint 的错误.
eslint 对代码质量有很大的保障

@jeekliang
Copy link

@jeekliang 建议你fix 掉 eslint 的错误.
eslint 对代码质量有很大的保障

目前项目处于 roadhog 1.x.x -> 2.4.9 我目前 禁止了 代码检查, 但是代码在编译的时候出现了 Module build failed: Error: Cannot find module 'babel-plugin-transform-decorators-legacy' 有什么解决方法吗

dengli1216 pushed a commit to myForkProject/ant-design-pro that referenced this pull request Mar 17, 2021
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

Successfully merging this pull request may close these issues.