3 years ago

Requiring the same component more than once

Posted 3 years ago by TheFriendlyHacker

I'm building an SPA using vue-router, laravel-elixir-vueify, and Browserify. I have some components that I want to re-use on multiple views.

If I require() the same component for each view that I use it in, will the scripts, template and styles for that component be copied each time? In other words, will requiring the same component multiple times make my javascript file larger than if it was required just once?

Please sign in or create an account to participate in this conversation.