188 questions
1
vote
2
answers
71
views
Error when updating to Next 15.5.2: Error: ObjectMiddleware.register: serializer for mini-css-extract-plugin/dist/CssModule/null is already registered
When updating Next.js for applications in my monorepo (turborepo) from version 15.3.3 to 15.5.2 I get the following error:
Error: ObjectMiddleware.register: serializer for mini-css-extract-plugin/...
1
vote
1
answer
73
views
Separate JS code for multiple webpack entries
I want to create 2 separate entries in Webpack config (e.g. app1.js and app2.js) so that each entry point has its own JS and CSS code.
There are following files:
app1.js
import('./app1.css');
console....
1
vote
0
answers
699
views
"You forgot to add 'mini-css-extract-plugin' plugin" when work with thread-loader
Try to use thread-loader with mini-css-extract-plugin. When run npm build script, got error:
> cross-env NODE_ENV=production webpack
assets by status 958 bytes [cached] 1 asset
runtime modules 663 ...
0
votes
1
answer
40
views
webpack css loaders working on windows powershel but dont in linux bash
I have a webpack setup that works properly in Windows powershell,
But when trying to build the same in Linux console
It seems that the css loaders are not working properly
However, I'm not sure where ...
0
votes
1
answer
100
views
"Import * as" not working after upgraing some css related loaders
I upgraded the following packages to their latest versions:
package name
current version in project
upgraded version(latest version)
mini-css-extract-plugin
0.8.2
2.8.0
postcss-browser-reporter
0.5.0
...
1
vote
1
answer
219
views
Processing .css files included inside link tags in HtmlWebpackPlugin template
Brief Description:
I am running into unexpected outputs/issues when working with .css files referenced inside <link> tag in the .html template provided to HtmlWebpackPlugin along with using ...
0
votes
1
answer
223
views
Webpack strange behaviour while loading css or sass dynamically using import()
This is my second day working with Webpack bundler.
I am using mini-css-extract-plugin loader.
Everything works as expected but when I import the css files dynamically I noticed some strange behaviour....
1
vote
2
answers
177
views
How can I dynamically output JavaScript files individually with Webpack based on a folder?
I am putting together a new webpack build for my project and it's actually working pretty well. I have one problem that I'd like some help on if anyone has an idea. I have to retype all of this from ...
0
votes
0
answers
117
views
Getting an error during webpack build while using CSS modules
Error
1 | // extracted by mini-css-extract-plugin
2 | export default {"lala":"hQupzgS9tEJmjp6wWbAk"};
(lala is classname)
CSS modules is working fine and changes are reflecting ...
1
vote
0
answers
65
views
Webpack - css - extract to multiple files?
I'm on Webpack 5, compiling mostly Vue sfc sass styles, and currently I achieved to extract all the css styles to a single css bundle using mini-css-extract-plugin.
Obviously this bundle has grown in ...
0
votes
0
answers
1k
views
Webpack generating random file name for css included in JS file
I am using webpack for bundling js & css files, i am including css import in my js file,
Page1.js
import ('../css/page1.css');
import ('../css/welcome.css');
window.page1_func1 = () => {
...
1
vote
0
answers
161
views
Webpack mini-css-extract-plugin breaks popup js on my chrome extension
I'm working on a chrome extension project.
I'm using MiniCssExtractPlugin to inject CSS into the content script.
It's working perfectly fine actually, but it breaks popup.js now.
It seems that can't ...
0
votes
1
answer
481
views
Webpack 5 mini-css-extract-plugin dropping scss files
I am migrating a webpack config from webpack 4 and am trying to wire in the mini-css-extract-plugin. However, all of my first party app CSS (SCSS) is not being injected into the main app.css file ...
1
vote
0
answers
51
views
MiniCssExtractPlugin loader is loading css to two different files
My webpack contains this:
{
test: /\.css$/i,
exclude: /node_modules/,
use: [MiniCssExtractPlugin.loader,"css-loader"]
}
and I have appLayout.js file that loading css files, that ...
0
votes
0
answers
82
views
React use css from imported files only
Hi guys I have an issue with my css in the react project
I have a component called header.jsx and the header.scss file is imported in it, so I want the css to be applied from header.scss only not from ...
5
votes
0
answers
189
views
Can't import css as string when using MiniCssExtractPlugin
I'm using webpack. I need to load a css file as a string and I'm able to do so with css-loader, but I also need to use MiniCssExtractPlugin to inject css directly into the DOM. If I use ...
0
votes
1
answer
639
views
Can I access css filename with content hash created by MiniCssExtractPlugin in React App?
I am trying to load dynamically link tag inside a React component with shadow dom, but I can't find a solution to access filename/path with hashes generated by MiniCssExtractPlugin/Webpack.
General ...
4
votes
1
answer
2k
views
React/mini-css-extract-plugin conflicting import order error: Verbose build logs?
I'm working on a CRA react app and I've recently come across some CSS import order warnings from mini-css-extract-plugin:
chunk 1 [mini-css-extract-plugin]
Conflicting order. Following module has been ...
7
votes
1
answer
10k
views
extract-text-webpack-plugin replacement in webpack 5
I'm working on the project upgrading from webpack 3 to webpack 5. In the project, it was using raw-loader and extract-text-webpack-plugin to parse imported html file(angular component), then combine ...
0
votes
1
answer
1k
views
MiniCssExtractPlugin error when I run npm run build
I'm trying to run "Npm Run Build" on my reactjs website, but I keep getting this error:
/usr/local/lib/node_modules/react-scripts/config/webpack.config.js:664
new MiniCssExtractPlugin({
...
3
votes
2
answers
845
views
Duplicating css var. First time with correct value and second time just like var(--variable). Why? (React, webpack, css)
I have next css which I include in js file:
:root {
--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/...
1
vote
1
answer
2k
views
How to exclude link tags (or more specifically .css files extracted by the mini-css-extract-plugin) from being generated by html-webpack-plugin?
Due to how the (legacy) project is currently set up, I cannot benefit from the caching capabilities of webpack in the standard way, but instead have to generate the scripts in empty files (like main....
1
vote
0
answers
383
views
"mini-css-extract-plugin" every time injects a new number in main.js file on each build which changing contenthash number of main.js unnecessarily
I am using webpack 5, and using contenthash for the main.js file. But my main.js file gets a new hash number on every build even if there is nothing changed in my application. When I compared two main....
1
vote
3
answers
932
views
Font Awesome commenting out <i></i> tag after parsing
I'm working on a React application where I want conditional rendering of FontAwesome icons, but at the moment it's not changing when it should.
I inspected elements and found that FontAwesome is ...
1
vote
1
answer
373
views
Font Awesome loading as boxes with less.js and webpack
I recently tweaked my webpack modules in my React/Electron.js project to compile less files using less-loader, css-loader, and MiniCssExtractPlugin.loader instead of the style-loader since there is no ...