mrspark2591:vue-sass

v0.1.2Published 3 years ago

Integrate sass and scss with vue single-file components for Meteor

Compatibility: Vue 1.x, Vue 2.x

This meteor package adds sass support in your single-file .vue components.

Installation

meteor add akryum:vue-sass

Usage

1<style lang="scss">
2$message-color: grey;
3
4.message {
5  color: $message-color;
6}
7</style>
8
9<style lang="sass">
10$message-color: grey
11
12.message
13  color: $message-color
14</style>

You can import files with absolute or relative path:

1<style scoped lang="sass">
2// Absolute path in the project
3@import ~imports/ui/colors.sass
4// Relative path
5@import ../../imports/ui/colors.sass
6</style>

Config

In project package.json, you can add more folders for the sass file resolution:

1{
2  "vue": {
3    "css": {
4      "sass": {
5        "includePaths": [
6          "node_modules"
7        ],
8      }
9    }
10  },
11}

LICENCE ISC - Created by Guillaume CHAU (@Akryum)