-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module build failed with Vue-CLI #32
Comments
@netstuff Try |
@epegzz , thank u very much! I feel ashamed :( |
Haha, no worries! 😄 |
Nice plugin 👍 Since this might be helpful to other people, the right way to configure this with Vue CLI (v3.8.4) is: // vue.config.js
module.exports = {
chainWebpack: config => {
const moduleTypes = ['vue-modules', 'vue', 'normal-modules', 'normal']
moduleTypes.forEach(type =>
config.module
.rule('scss')
.oneOf(type)
.use('@epegzz/sass-vars-loader')
.loader('@epegzz/sass-vars-loader')
.options({
syntax: 'scss',
files: [path.resolve(__dirname, './src/styles/colors.js')],
})
)
},
} I would also consider adding this to the documentation 🙂 |
Thanks @franciscolourenco! I opened #33. The documentation could use some general refresh anyways :) 👍 |
Thanks @franciscolourenco! All works, but I don't understand how should I use it :(
and
Please, help me to find proper way to use this plugin. |
@netstuff would need to see your vue.config.js |
I found out that
|
I have not much knowledge about vue (in fact none at all 😄) but my suspicion would be, that the sass files are processed before the |
@netstuff how are you importing the |
Using |
You might need import them in the <script> of js file with |
or inside of <style> use |
It works! @franciscolourenco, thank u very much! |
Hello. Thank you for this work :)
I try to use it with Vue-CLI through
vue.conf.js
with next config:But when project starts I have error in console for every using Vue-component:
What I do wrong?
The text was updated successfully, but these errors were encountered: