Skip to main content

All Questions

Tagged with
0 votes
0 answers
14 views

how to get vite to compile scss/sass

I have a scss file i need compiled into a css file to be included on a blade template. I have installed sass as a dependence. I have the scss file listed in the scss additional data. But during the ...
Michael LaPan's user avatar
0 votes
1 answer
44 views

Vite 5 not importing scss variables

For some background we have a bunch of theme colors provided by a designer and are trying to integrate them into a single source of truth as they change often during the prototyping phase. To this end ...
Menachem Hornbacher's user avatar
0 votes
0 answers
19 views

Extract @layer styles from css / scss and output to file

is it somehow possible using vite and sass to extract styles of a specific CSS @layer from a stylesheet and output those styles into a separate file? The idea is to add an layer critical and output ...
Code Spirit's user avatar
  • 4,667
0 votes
0 answers
50 views

Is it possible to create a vite/rollup react UI library that does not compile sass?

So Im trying to create my own style library so that I can import it in all my projects instead of spamming the files over and over again in all projects. My components are react and styled with Sass. ...
Gonçalo Condeço's user avatar
0 votes
2 answers
78 views

How correct import styles

I using vanilla javascript + Vite, why styles doesn't work? this point I import style of logo component and this is common style.css @import url("./CORE/Logo/style.scss"); *, body, html { ...
ваня к's user avatar
2 votes
2 answers
784 views

vitejs treat all .scss files as css modules

I am working with a legacy package in a monorepo and am including in the optimizeDeps array - is it possible to tell Vite to treat all .scss files it sees as CSS Modules files? Originally asked in ...
JaKXz's user avatar
  • 1,641
0 votes
0 answers
84 views

Code splitting in a React and Vite SSG UI library

I have spent hours going over Vite documentation and git-issues and tried a number of things but nothing seems to allow code splitting in SSG library mode. This is really annoying as you want to be ...
John williams's user avatar
0 votes
0 answers
62 views

SCSS Style Encapsulation per Component with Vite in a Component Library

I have a problem with SCSS encapsulation per component. I'm building a component library and, for example, I have an Alert.jsx component and an Alert.scss file. The SCSS file is imported in the Alert....
Uwis's user avatar
  • 72
0 votes
0 answers
338 views

Can you use S/CSS modules and have styles build inline using Vite?

I have spend sometime trying to work out how to import a scss module into react components and have them compile as inline styles within the compnent. With the intention of being able to import my ...
John williams's user avatar
1 vote
0 answers
83 views

Vitejs doesnt compile scss and js item with the same name

I work with Drupal and Twig components. For instance, I have a button component that consists of the following files within the 'button' folder: button.twig, button.js, and button.scss. Now, I want to ...
YustinTR's user avatar
0 votes
1 answer
709 views

Is there a way to export the styling in vite library mode for a react app?

I have a vite react TS app with JSX components, mudule.scss and global css files. When I build it using Library Mode I get separated .js, .d.ts and .css. But when I install it in any other app, the ...
badrddinb's user avatar
0 votes
0 answers
46 views

How do I condition the use of certain assets to road groups in a Laravel project with Vite?

I have a Laravel 10 project using Vite. I succeed in compiling assets with this configuration : vite.config.js import laravel from 'laravel-vite-plugin' import { defineConfig } from 'vite' var config ...
Petitemo's user avatar
  • 187
3 votes
1 answer
347 views

Angular new Vite builder compilation error when using sass with @use statements

Compilation error when trying to use Vite builder. [ERROR] Can't find stylesheet to import. @use 'src/styles/utils/mixins' as mixins; src\app\app.component.scss 1:1 root stylesheet [plugin angular-...
Muhammad-Ali's user avatar
4 votes
0 answers
270 views

How to import .env variables into variables.scss in vite 5.0

So guys I have a requirement where I will get the theme (color,font) from user and we need to add it in our .env file and build it with the theme.So how to write it in .env and and after building it ...
Sriram Prasanth's user avatar
0 votes
1 answer
141 views

scss colors don't apply in storybook

I have a react ts project created with vite and tailwindcss, I customized theme with scss, the problem is that scss styles do not apply in stories. the main.ts file: import type { StorybookConfig } ...
nstrn_prsh's user avatar

15 30 50 per page
1
2 3 4 5
10