Git Product home page Git Product logo

Comments (8)

nklayman avatar nklayman commented on August 23, 2024 1

In v1.0.0 (two weeks away), you will be able to use variables the normal way, as vue.config.js will be used.

from vue-cli-plugin-electron-builder.

nklayman avatar nklayman commented on August 23, 2024

Follow the instructions here to add sass/scss support, it should build successfully then. You will have to use a separate loader for the variables like this. Please close the issue and mention how you got the variables working if you do. Thanks.

from vue-cli-plugin-electron-builder.

elcontraption avatar elcontraption commented on August 23, 2024

I already had node-sass and sass-loader installed. I was able to get variables working in components by removing the vue.config.js css.loaderOptions settings and just manually importing my variables file in every component. Not ideal but it seems to work.

from vue-cli-plugin-electron-builder.

nklayman avatar nklayman commented on August 23, 2024

I just released the first v1.0.0 alpha! Go ahead and try it again with the new version and let me know if it works. Thanks.

from vue-cli-plugin-electron-builder.

elcontraption avatar elcontraption commented on August 23, 2024

Thought I had it working but I spoke too soon. Currently stuck on #24.

from vue-cli-plugin-electron-builder.

nklayman avatar nklayman commented on August 23, 2024

What os are you using?

from vue-cli-plugin-electron-builder.

nklayman avatar nklayman commented on August 23, 2024

Please follow the instructions on this issue comment. Thanks!

from vue-cli-plugin-electron-builder.

Jack-Barry avatar Jack-Barry commented on August 23, 2024

I hit this issue when trying to reorganize the src directory of our app and placed styles into a subfolder named renderer. This breaks the reference that Vuetify uses. After a lot of contact between my head and desk, I found out the secret sauce is this in vue.config.js:

const importVariablesScss = `@import "~@/renderer/styles/variables.scss"`

module.exports = {
  css: {
    loaderOptions: {
      sass: { additionalData: importVariablesScss }, // No semi-colon
      scss: { additionalData: `${importVariablesScss};` } // Semi-colon
    }
  }
  // Other stuff
}

I guess they both have to be there in order for it to work. (I was under the assumption it would only need to be one or the other for some reason 🤷‍♂️) If either is missing it causes issues though. Hope this helps anybody else trying to do something similar

from vue-cli-plugin-electron-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.