nonua / chrome-vite-svelte-ts-sass-boilerplate

Chrome extension boilerplate with Svelte, Vite, Typescript and Sass
MIT License
0 stars 0 forks source link

Specifying styles to a content script #22

Closed avi12 closed 2 years ago

avi12 commented 2 years ago

I need to specify styles in SCSS like so:

import { defineManifest } from "@crxjs/vite-plugin";

export default defineManifest({
  content_scripts: [
    {
      matches: ["domain"],
      js: ["src/content.ts"],
      css: ["src/content.scss"]
    }
  ]
});

Except, Vite won't process src/content.scss into build/src/content.css

nonua commented 2 years ago

Currently crxjs does not support that feature, instead you could add this at the beginning of content.ts

import 'path/to/content.scss';