8000 Fix Lodash not loading from unpkg by trevorstacy · Pull Request #1082 · vuejs/v2.vuejs.org · GitHub
[go: up one dir, main page]

Skip to content

Fix Lodash not loading from unpkg #1082

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix Lodash not loading from unpkg
For some reason, unpkg is not loading lodash.min.js, which is breaking the question example for watchers on the computed properties page. I've checked the .min links for axios and vue on unpkg, and it looks like it is just an issue with lodash. For example https://unpkg.com/lodash@4.13.1/lodash.min.js will return an error saying

> Cannot find file "/lodash.min.js" in package lodash@4.13.1

Going to https://unpkg.com/lodash@4.17.4/lodash.min.js results in the same error but with the 4.17.4 tag.

I have checked the directories on unpkg and they are listed as being there. Someone may want to get in contact with unpkg to let them know this, as for now I've suggested to use cdnjs for the lodash@4.17.4 min.js file which fixes the error the computed properties page was getting (_ is not defined).
  • Loading branch information
trevorstacy authored Aug 16, 2017
commit b9c599c4538d2d71c56b96bfe65f562fe51c97cd
4 changes: 2 additions & 2 deletions src/v2/guide/computed.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ For example:
<!-- is able to remain small by not reinventing them. This also -->
<!-- gives you the freedom to just use what you're familiar with. -->
<script src="https://unpkg.com/axios@0.12.0/dist/axios.min.js"></script>
<script src="https://unpkg.com/lodash@4.13.1/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.13.1/lodash.min.js"></script>
<script>
var watchExampleVM = new Vue({
el: '#watch-example',
Expand Down Expand Up @@ -262,7 +262,7 @@ Result:
<p>{{ answer }}</p>
</div>
<script src="https://unpkg.com/axios@0.12.0/dist/axios.min.js"></script>
<script src="https://unpkg.com/lodash@4.13.1/lodash.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.13.1/lodash.min.js"></script>
<script>
var watchExampleVM = new Vue({
el: '#watch-example',
Expand Down
0