Skip to content

Instantly share code, notes, and snippets.

@vuejsdevelopers
Created July 10, 2017 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vuejsdevelopers/41e157ca9f2a3ada145c08b304191ffe to your computer and use it in GitHub Desktop.
Save vuejsdevelopers/41e157ca9f2a3ada145c08b304191ffe to your computer and use it in GitHub Desktop.
3 Code Splitting Patterns For VueJS and Webpack - Snippet 02
<template>
<div>
<div class="jumbotron">
<h1>Jumbotron heading</h1>
...
</div>
<below-fold></below-fold>
<!--All the code below here has been put into-->
<!--into the above component-->
<!--<div class="row marketing">
<div class="col-lg-6">
<h4>Subheading</h4>
<p>Donec id elit non mi porta gravida at eget metus. Maecenas faucibus mollis interdum.</p>
...
</div>
...
</div>-->
</div>
</template>
<script>
const BelowFold = () => import(
/* webpackChunkName: "below-fold" */ './BelowFold.vue'
);
export default {
...
components: {
BelowFold
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment