posva / vue-plugin-template

🚀 Solid foundation to start a Vue plugin with the best developer experience and a focus on performance
MIT License
191 stars 27 forks source link

How to import public scss. #7

Closed seekcx closed 7 years ago

seekcx commented 7 years ago

I am using this project, write a ui framework, i have some basic scss files, want to use in all cases, what should i do? I tried to import it in index.js, but it did not succeed.

// src/index.js
import './common/scss/base.scss'
seekcx commented 7 years ago

I imported it in test.vue, seemingly can work, do not know if there is a better way.

posva commented 7 years ago

If you're importing sass files only on your js, you can use https://github.com/differui/rollup-plugin-sass If you're using it in both sides, I recommend you using webpack, it'll be easier. I used webpack for css and rollup for js in this project: https://github.com/posva/vue-mdc in case you want to take a look