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

建议安装脚手架和构建器时增加参数--global-style #20

Closed
LeoEatle opened this issue Dec 6, 2018 · 3 comments
Closed

建议安装脚手架和构建器时增加参数--global-style #20

LeoEatle opened this issue Dec 6, 2018 · 3 comments
Assignees

Comments

@LeoEatle
Copy link
Contributor

LeoEatle commented Dec 6, 2018

npm将node_modules扁平化安装,导致构建器或者脚手架的依赖互相影响,比如安装builder-webpack3时会在.feflow下安装webpack3,而使用builder-webpack4时会寻找到webpack3,导致构建报错。

npm install --global-style能避免此问题

相关issue #feflow/builder-webpack4#12

@LeoEatle
Copy link
Contributor Author

LeoEatle commented Dec 6, 2018

另外,建议这种改动作为一个大版本发布,如果检测到用户目录下依然是扁平化的,建议直接删除node_modules重新npm install --global-style

这样也能使.feflow目录结构非常nice:

├── node_modules
│   ├── @tencent
│   ├── builder-webpack3
│   ├── builder-webpack4
│   ├── generator-now-hybrid
│   ├── generator-redux-startkit

脚手架和builder的依赖互不影响,使用了哪些脚手架一目了然😊

@cpselvis
Copy link
Collaborator

cpselvis commented Dec 6, 2018

这个考虑在Feflow的v0.15.0中增加

@cpselvis
Copy link
Collaborator

已支持。bb509d8

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

No branches or pull requests

2 participants