A
A
Anton2017-02-15 14:14:46
webpack
Anton, 2017-02-15 14:14:46

How to import styles from node_modules into vue.js component?

Good day!
How to import styles in one of the .vue components?

<template>
    <div class="container">
        <h1>Home test</h1>
        <div id='calendar'></div>
    </div>
</template>

<script>
import $ from 'jquery'
import fullcalendar from 'fullcalendar'
export default {
  name: 'Home',
  components: { fullcalendar },
  methods: {
    getCall: function () {
      $('#calendar').fullCalendar({})
    }
  },
  mounted: function () {
    this.getCall()
  }
}
</script>
<style src="./fullcalendar.min.css"></style>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
amokrushin, 2017-02-16
@Ooos

<script>
import fullcalendar from 'fullcalendar'
import 'fullcalendar/dist/fullcalendar.min.css'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question