All Questions
98
questions
-1
votes
1
answer
56
views
How to apply module wise class mapping for all css files inside a specific folder only [closed]
How to apply module wise class mapping for all CSS files inside a specific folder only
I have added the code below but it doesn't work
{
test: /.css$/i,
use: [
"style-loader",...
1
vote
0
answers
20
views
Loading styles with style-loader into secondary windows
I have a project that uses electron and react. Styles in this project are defined in .scss files, which are then imported into react components (e.g. the main page, App.tsx, has an import 'styles/main....
0
votes
0
answers
53
views
Unable to find component with ID "iframe" in webpack bundle
I am currently working on a React project where I am using the react-frame-component along with webpack to encapsulate styles for a widget I am building. I want to insert my styles into the iframe ...
0
votes
1
answer
64
views
Why absolute path for importing images has wrong format in Webpack 5?
After migration to webpack5 and updating all libraries I faced with this issue.
Here is my webpack config:
const path = require('path');
const glob = require('glob');
const {ProvidePlugin} = require('...
1
vote
1
answer
544
views
Issues with style-loader lazyloading for multiple elements in shadow-dom
I'm currently working with webpack and style-loader to inject my styles into components that use shadow-dom. However, the issue happens when I try to use multiple instances of the element (the styles ...
-1
votes
1
answer
1k
views
Style Loader has been initialised using an options object that does not match the API schema
I am a very new to programming. So read a few articles and trying to configure web-pack for the following purpose.
I'm building a preact widget and the CSS is clashing with parent website. Hence I'm ...
5
votes
1
answer
2k
views
Webpack style-loader insert SCSS into shadow-dom
I am trying to configure webpack to insert my custom SCSS styles into a shadow DOM node instead of at the head of the document. The location of the shadow DOM node will not always be consistent, so ...
2
votes
1
answer
2k
views
Direct Usage of ClassName not working in React
I am not understanding a issue here in CSS. In my project I have a case.
I tried to import CSS directly from one of my file like below
import './styles.css'
and tried to use like this and its not ...
0
votes
1
answer
181
views
WebPack adding underscores to classes of an imported stylesheet breaking styles of react component
I am having a weird issue on an electron-react app.
Essentially when I import the stylesheet of an NMP package React-Quill
It's a Block-style editor as react component
As per the instructions I am ...
43
votes
6
answers
46k
views
Type Error: this.getOptions is not a function For style-loader
Problem
While using Storybook, I am running npm run storybook and getting the error below.
ModuleBuildError: Module build failed (from ./node_modules/style-loader/dist/cjs.js):
TypeError: this....
2
votes
0
answers
400
views
How to migrate from manually compile sass to use webpack?
Recently I am working a react project in new company. The current development in local is using node-sass-chokidar pkg manually compile the scss files to css files. Here is the basic package json ...
0
votes
0
answers
31
views
CSS not getting imported in component
I have the following Test component:
Test.css
.SomeClass {
background-color: blue;
width: 100px;
height: 100px;
}
Test.tsx
import React from 'react';
import './Test.css';
export const ...
2
votes
1
answer
882
views
Error: Couldn't find a style target. It started to appear after SSR with React implementation. How to fix?
I had a CSR app and now implemented Server-Side Rendering (SSR) with React, and get this error
Error: Couldn't find a style target
We used reactDOMserver, react-app-wire, with webpack-override file
...
2
votes
0
answers
2k
views
CSS and SCSS with NextJS (issue while using multiple loaders: next-sass, next-css)
I am trying to convert a CRA to Next.js. Currently I am facing an issue with styles. As per current structure we have modules based SCSS files.
So what I need is:
Import modules based SCSS files as ...
1
vote
0
answers
57
views
Css Class Not Applied Anymore
i'am new in reactjs i face an issue while trying to follow along with CSS modules , in my case i run the command npm run eject commant then i configure my webpack.config.dev.js file and wepack.config....