I
I
Igor Lebedev2019-04-04 14:50:15
Vue.js
Igor Lebedev, 2019-04-04 14:50:15

How to organize modularity in vue?

I would like to organize the components so that everything related to 1 component is in 1 folder.
Component
- Component.vue
- Component.scss
- asset.png
With vue, for some reason, they offer only a structure decomposed in meaning, although in React this is implemented at once.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
fl3nkey, 2019-04-04
@FLUNKEY

Previously, I used this approach (which is below), but then abandoned it, because. it is more convenient to describe everything in one file.

- Component
-- Component.vue
-- Component.js
-- Component.scss

<template>
  <div>my component</div>
</template>

<script src="./Component.js"></script>
<style lang="scss" src="./Component.scss">

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question