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

[New Feature] 希望能提供[email protected]搭建的项目使用方式 #212

Closed
GodStream opened this issue May 26, 2018 · 8 comments
Closed

Comments

@GodStream
Copy link

GodStream commented May 26, 2018

What problem does this feature solve?

目前项目是用的[email protected]搭建的,看文档的描述,初期配置比较繁琐,希望能提供统一的vue-cli @3.0使用方式,这样将来大家整体都转到3.0时会节省不少时间。

按照 #165 的方式是有问题的,webpack-transform-modules-plugin会于vue-cli内部产生冲突,导致相关配置无法生效,最终按需加载是无法成功的,只能全部引入。

What does the proposed API look like?

...

@areyouse7en
Copy link

+1

@dolymood dolymood self-assigned this May 28, 2018
@dolymood
Copy link
Contributor

请参考 cube-ui/question-answer#14

@GodStream
Copy link
Author

GodStream commented Jun 6, 2018

执行build会报错

UnhandledPromiseRejectionWarning: Error: Cyclic dependency
(node:8376) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:8376) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

运行时会报
DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
@dolymood

找到原因了,应该是 html-webpack-plugin 出的问题
vuejs/vue-cli#1351
jantimon/html-webpack-plugin#870

@Devon3818
Copy link

[[email protected]] 如何搭配使用DEMO 亲自试过可行

@NavOrange
Copy link

@GodStream 添加了 args[0].chunksSortMode = 'none' 还有警告
DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
请问你是怎样配置 vue.config.js 的?

@dolymood
Copy link
Contributor

dolymood commented Jul 31, 2018

那只是个警告而已,忽略就好了,核心是因为 webpack 的插件系统做了升级

@dolymood
Copy link
Contributor

dolymood commented Aug 1, 2018

推荐直接使用插件 https://github.com/cube-ui/vue-cli-plugin-cube-ui ,只需要初始化项目后执行 vue add cube-ui 即可,配置项参考 https://github.com/cube-ui/cube-template/wiki

@chengwb53
Copy link

📦 Installing vue-cli-plugin-cube-ui...

  • [email protected]
    updated 1 package in 15.901s
    ✔ Successfully installed plugin: vue-cli-plugin-cube-ui

? Use post-compile? Yes
? Import type Partly
? Custom theme? No
? Use rem layout? No
? Use vw layout? No

🚀 Invoking generator for vue-cli-plugin-cube-ui...
ERROR TypeError: Cannot read property 'type' of null
TypeError: Cannot read property 'type' of null
at Context.visitVariableDeclarator (C:\Users\xx\AppData\Roaming\npm\node_m
odules@vue\cli\lib\util\extendJSConfig.js:34:21)
at Context.invokeVisitorMethod (C:\Users\xx\AppData\Roaming\npm\node_modul
es@vue\cli\node_modules_ast-types@0.12.4@ast-types\lib\path-visitor.js:284:51)
at Visitor.PVp.visitWithoutReset (C:\Users\xx\AppData\Roaming\npm\node_mod
ules@vue\cli\node_modules_ast-types@0.12.4@ast-types\lib\path-visitor.js:159:32)
at NodePath.each (C:\Users\xx\AppData\Roaming\npm\node_modules@vue\cli\no
de_modules_ast-types@0.12.4@ast-types\lib\path.js:89:26)
at visitChildren (C:\Users\xx\AppData\Roaming\npm\node_modules@vue\cli\no
de_modules_ast-types@0.12.4@ast-types\lib\path-visitor.js:180:18)
at Visitor.PVp.visitWithoutReset (C:\Users\xx\AppData\Roaming\npm\node_mod
ules@vue\cli\node_modules_ast-types@0.12.4@ast-types\lib\path-visitor.js:168:20)
at visitChildren (C:\Users\xx\AppData\Roaming\npm\node_modules@vue\cli\no
de_modules_ast-types@0.12.4@ast-types\lib\path-visitor.js:205:25)
at Visitor.PVp.visitWithoutReset (C:\Users\xx\AppData\Roaming\npm\node_mod
ules@vue\cli\node_modules_ast-types@0.12.4@ast-types\lib\path-visitor.js:168:20)
at NodePath.each (C:\Users\xx\AppData\Roaming\npm\node_modules@vue\cli\no
de_modules_ast-types@0.12.4@ast-types\lib\path.js:89:26)
at visitChildren (C:\Users\xx\AppData\Roaming\npm\node_modules@vue\cli\no
de_modules_ast-types@0.12.4@ast-types\lib\path-visitor.js:180:18)

老哥些,这是怎么回事?

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

6 participants