Skip to main content

All 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",...
Ajith's user avatar
  • 2,636
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....
Kaisa Azaria's user avatar
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 ...
Nightcrawler's user avatar
  • 1,061
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('...
football manager's user avatar
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 ...
wolfy's user avatar
  • 476
-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 ...
Tomaz_'s user avatar
  • 449
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 ...
Nexxus's user avatar
  • 151
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 ...
Krishna's user avatar
  • 1,342
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 ...
Georgi's user avatar
  • 65
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....
Bryan Guillen's user avatar
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 ...
qmkiwi's user avatar
  • 135
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 ...
Kartik's user avatar
  • 7,817
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 ...
Nextdev's user avatar
  • 21
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 ...
Shah Lav's user avatar
  • 133
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....
justCode's user avatar

15 30 50 per page
1
2 3 4 5
7