by octref · 10y ago · 0 comments
But the thing I like most about Vue is it allows me, who identifies as a front-end dev or design-coding hybrid, to quickly iterate and build prototypes. Look at the single file component:
<template>
<div id="list">
<li></li>
<li></li>
</div>
</template>
<script>
export default {
// Define your component
}
</script>
<style scoped>
#list { list-style: none }
</style>
I can quickly edit the template to alter my component's DOM structure, style it with scoped css, and change its dynamic behavior in the script tag. Like the suite of Jade/Coffee/Stylus? Adding a lang attribute to each tag and you are good to go. Awesome stuff.But then I discovered that there's already a new tool that's cooler than webpack: rollup [1].
[1]: http://rollupjs.org/
I mean, it is really handy to have a tool to save you from the initial setup and all that boilerplate code when you already know how it works.
But not knowing how the different pieces fit together will bite you when things start to fail.