Skip to main content

All Questions

Tagged with
0 votes
1 answer
35 views

Webpack raw-loader/style-loader importing CSS file as JavaScript string instead of CSS content

I am using Webpack to build my chrome extension and I am trying to import a CSS file as a string so that I can inject it into a shadow DOM. However, when I import the CSS file, it is imported as ...
Joel Benjamin's user avatar
0 votes
1 answer
23 views

CSS not loading when importing UMD into ESM file

I'm transpiling a React component library into UMD using Webpack (Babel, etc.). The components load just fine in a local Storybook instance, but when I import them into a new create-react-app project, ...
robbymarston's user avatar
0 votes
0 answers
66 views

Error in import default from css file using vite and webpack

I'm trying to migrate from Create react app to Vite. But now I have the following error in on of the packages that I use in my React app. [vite] connecting... client.ts:19:8 [vite] connected. client....
Mateus Gonçalves's user avatar
0 votes
1 answer
25 views

Styles and css are not loaded in browser

i've updated my packages versions on react project, and styles now not loading. in code i use styles like this: import styles from "../WrappersCommon.scss"; ... <div className=...
user453575457's user avatar
0 votes
1 answer
86 views

Next.js app won't load bundled CSS from a React Component Kit

I have a repository of React components. Each component has its own .css file that gets imported into the component. These components are then bundled using a rollup config and published as an NPM ...
Dog's user avatar
  • 2,828
0 votes
0 answers
25 views

React scripts not loading on localhost using npm start, but load when opening the index.html in firefox

I've been learning react and webpack at the same time to try set up a webapp to learn web development. I've recently started learning react to make some toggle buttons work, but for some reason they ...
Rowan396's user avatar
0 votes
0 answers
19 views

Differ style files from module style files

I'm writing webpack config for my React/TypeScript application. I want to generate unique names for classes and ids only if file name ending with .module.scss or .module.css So I wrote these rules: { ...
EzioMercer's user avatar
  • 1,677
0 votes
0 answers
88 views

Webpack & SCSS: Attempted import error: '' is not exported from '' (imported as '')

I have scss variables exported from a scss module and then imported into a React component but receive this error when trying to build my application with webpack: Attempted import error: '...
AppSupportGuru1995's user avatar
0 votes
0 answers
23 views

Webpack ProvidePlugin import before CSS Modules?

I'm using Webpack's ProvidePlugin to auto-import common components such as a <Button /> component. I'm also using CSS Modules. A typical component might look like: import styles from './...
Leo Jiang's user avatar
  • 25.6k
0 votes
1 answer
58 views

I used less in the react program, but less did not take effect

I used less in the react program, but less did not take effect I used a minimum set, below is the content app.tsx: import React from 'react' import { message, Popover, Button, Checkbox, } from ...
huo liu's user avatar
0 votes
0 answers
34 views

Webpack CSS class non applied to HTML elements and React components

I set up a project with Webpack, Lit2 and React. I have a problem with CSS Stylesheet and React components. I created a stylesheet 'homesheet.module.css' and imported in my React component. import ...
BDM's user avatar
  • 1
0 votes
0 answers
77 views

CSS Modules aren't being loaded in any React Component

I am attempting to utilize CSS Modules for styling my components, however they do not see to be applied. I've created my React App using Create-React-App, which includes React(18.2.0) and ReactScripts(...
Karoly S's user avatar
  • 3,256
1 vote
0 answers
405 views

Wrapping a react webapp in a web component

I have a react webapp I would like to put into a web component. The webapp relies on a css and a sass file loaded by import statement. Of course moving the webapp into the web component causes styles ...
Francesco's user avatar
  • 1,784
0 votes
0 answers
74 views

Module.scss files merging after build and losing order (thus differ specificity on local and on stage)

I work on project with a self-made UI kit. Both app and UI kit use React TS components and scss modules (app framework is Next.js). Our team noticed that some styles are applied differently on stage ...
Anton Hevirr's user avatar
1 vote
0 answers
34 views

Load Component's CSS only When Component is Rendered in React

There are two components wherein only one component will be rendered at a time conditionally. Every component has its respective CSS file which gets loaded inside the component using import statement, ...
Rama Rao M's user avatar
  • 3,021

15 30 50 per page
1
2 3 4 5
37