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

demo13里面关于第三方插件不合并的问题 #45

Closed
lczxhf opened this issue Jul 13, 2016 · 3 comments
Closed

demo13里面关于第三方插件不合并的问题 #45

lczxhf opened this issue Jul 13, 2016 · 3 comments

Comments

@lczxhf
Copy link

lczxhf commented Jul 13, 2016

你好!我试了您的demo13!但是有些疑问!
1.您在outfile里面最后生成了两个js文件。一个vendor.js里面包含了jquery的!,但是在mian.js里面又require了jquery,所以的话,bundle。js里面也包含了jquery!这样不会重复了吗?
2.我去掉了demo13里面main.js里面的 var $= rquire("jquery") 但是报了一个错就是$ 未定义

请问可以帮我解答一下吗?谢谢

@ruanyf
Copy link
Owner

ruanyf commented Jul 14, 2016

webpack 打包生成的是 vendor.js 和 bundle.js

@ruanyf ruanyf closed this as completed Jul 14, 2016
@lczxhf
Copy link
Author

lczxhf commented Jul 14, 2016

不好意思!字母不知道都变成中文的! 我重新发一遍:

你好!我试了您的demo13!但是有些疑问!

1.您在outfile里面最后生成了两个js文件。一个是vendor.js,一个是bundle.js
但是vendor里面就已经包含了jquery的!,
同时您又在main.js里面又require了jquery,所以的话,bundle.js里面也包含了jquery!
这样不会重复了吗?


2.我去掉了demo13里面main.js里面的 var $= rquire("jquery") 但是报了一个错就是$ 未定义

请问可以帮我解答一下吗?谢谢

@ruanyf
Copy link
Owner

ruanyf commented Jul 14, 2016

你看一下 bundle.js 就明白了,它不包含 jQuery 的。

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