Skip to content
This repository has been archived by the owner on Nov 19, 2023. It is now read-only.

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

Open
fahmiegerton opened this issue Nov 15, 2020 · 1 comment
Open

Comments

@fahmiegerton
Copy link

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?

@agrozyme
Copy link
Contributor

agrozyme commented Dec 3, 2020

do you add the packages?

  • node-sass
  • sass-loader

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants