saltyshiomix / nuxtron

⚡ Nuxt.js + Electron ⚡

Home Page:https://npm.im/nuxtron

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

All html tags (including head tag) is rendered when using sass/scss

fahmiegerton opened this issue · comments

I already added sass loader and follow the nuxt docs as what it said. But it doesn't work with electron. Here's what it ended.
image

and here is the code inside my scss file

* {
  transition: all 0.15s ease-in-out;
  display: block;
  background-color: #f8f9fa;
}

html,
body {
  font-family: "Open Sans", "Verdana", sans-serif;
  line-height: 1.4;
  margin: 0px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

and here's my nuxt.config.js

export default {
  // ssr: false,
  head: {
    title: 'this is broken app',
    meta: [
      { charset: "utf-8" },
      { name: "viewport", content: "width=device-width, initial-scale=1" },
      {
        hid: "description",
        name: "description",
        content: process.env.npm_package_description || "it has been drive me crazy like days"
      }
    ],
    link: [
      {
        rel: "stylesheet",
        href:
          "https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,800;1,400&family=Playfair+Display:ital,wght@0,400;0,500;1,400;1,500&display=swap"
      }
    ]
  },
  loading: { color: "#F4841A" },
  css: [
    "@/assets/scss/main.scss"
  ],
  plugins: [
    // {src: '~/plugins/element.js', mode: 'client'},
  ],
  buildModules: [
    // '@nuxtjs/fontawesome',
  ],
  /*
   ** Axios module configuration
   ** See https://axios.nuxtjs.org/options
   */
  axios: {
    // baseURL: process.env.AUTH_API,
    retry: { retries: 3 }
    // proxy: true
  },
  build: {
    extend: (config) => {
      config.target = 'electron-renderer';
    },
  },
}

what am i doing wroing?

do you add the packages?

  • node-sass
  • sass-loader