Skip to content

Adjust example for circular component #1071

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

Merged
merged 1 commit into from
Aug 8, 2017
Merged

Conversation

LinusBorg
Copy link
Member

Since vue-loader 13.*, we have to use require('./component.vue').default instead of require('./component.vue')

Since vue-loader 13.*, we have to use `require('./component.vue').default` instead of `require('./component.vue')`
@Jinjiang
Copy link
Member

Jinjiang commented Aug 9, 2017

Sorry for a small question: Is it better to use import instead? And I've found there are other 3 code snippets using import in the same file like https://github.com/vuejs/vuejs.org/pull/1071/files#diff-044f0befe8adfe59792a31b1763e3cc4R1139.
I think the example can be more "natural" or need more explanation. :-)
Thanks.

@LinusBorg
Copy link
Member Author

Using import() there would "work", but not be the same - import() creates an async module, so wouldn't be included in the main bundle.

@Jinjiang
Copy link
Member

Jinjiang commented Aug 9, 2017

Got this and synced the update into cn docs. :-)
Thanks.

@chrisvfritz chrisvfritz deleted the fix-circular-example branch August 31, 2017 04:28
kazupon pushed a commit to kazupon/vuejs.org that referenced this pull request Oct 1, 2017
* Adjust example for circular component (vuejs#1071)

Since vue-loader 13.*, we have to use `require('./component.vue').default` instead of `require('./component.vue')`

* Update date
@jbayona89
Copy link

@chrisvfritz
Copy link
Contributor

@jbayona89 Just fixed it. 🙂

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.

4 participants