Ingin melihat dokumen baru kami? Kami dokumen baru sekarang dalam versi beta. Selamat bersenang-senang!

How to use CSS pre-processors?

Thanks to Vue Loader, you can use any kind of pre-processor for your <template>, <script> or <style>: simply use the lang attribute.

Example of our pages/index.vue using Pug and Sass:

<template lang="pug">
  h1.red Hello World!
</template>

<style lang="sass">
  .red
    color: red
</style>

<style lang="scss">
  .red {
    color: red;
  }
</style>

To use these pre-processors, we need to install their webpack loaders:

npm install --save-dev pug pug-plain-loader
npm install --save-dev node-sass sass-loader

Kontributor

Kontribusi untuk halaman ini sekarang ditutup. Jika Anda ingin berkontribusi, silakan periksa dokumen baru sekarang dalam versi beta. Selamat bersenang-senang!

Platinum Sponsors

StoryblokMoovweb Support Us