833 questions
2
votes
1
answer
93
views
Webpack build suddenly failing because of `react-dev-utils` [closed]
I am suddenly unable to build my Webpack frontend, I randomly began getting this error despite not making any changes to the code:
Starting the development server...
/home/username/Documents/frontend/...
-1
votes
1
answer
216
views
Storybook/react/webpack5 unable to index
I have a project (node 24, react16, webpack5 & babel )and I'm trying to integrate it with storybook9; when I run the script npm run storybook
It throws:
...
Unable to index ./src/components/Button/...
0
votes
0
answers
48
views
webpack file doesn't refer node_modules present in the imported path , but refer for it its node_modules
I am webpacking a module from pathA, node_modules are ignored.
I import the pathA/index.js in pathB node index.js dynamically, which has the required node_modules.
But when I run pathB node index.js, ...
0
votes
0
answers
58
views
Aurelia, Webpack Upgrade from Version 3 to 5
I need some professional help.
Currently having a project which has some aurelia js version1 apps and we have some issues because we run on an old version of node: 16.18, the entire package for the ...
1
vote
0
answers
340
views
Zustand store shared via Module Federation only provides initial value in remote app
I'm building a micro-frontend architecture using Webpack Module Federation. I have a host app and a remote app (cart), and I'm trying to share a global Zustand store (themeStore) from the host to the ...
0
votes
0
answers
13
views
Cannot resolve a module outside the project with Webpack 5
I have a project and a separate library which is not contained in the project folder structure. It would look like this:
MyProject
src
Library
Subfolder
SomeModule
I want to access [some files] ...
-1
votes
1
answer
84
views
Excluding package using externals causes "Cannot use 'in' operator to search for 'core' in undefined" error
I am creating a razor class library that wraps the azure-maps-control npm package.
I use TypeScript to build the *.js and Webpack to bundle the *.js.
When I use the RCL in my Blazor web app it works ...
0
votes
2
answers
4k
views
TailwindCSS v4 with Sass not working in Webpack
Has anyone been able to successfully run TailwindCSS 4 with Sass in Webpack 5 & React app?
I am having some configuration issues where I don't get any console errors but CSS processing seems to be ...
1
vote
1
answer
55
views
Spine2D Atlas 404 Error in Phaser with Webpack 5
When I try to load Spine2D's atlas in Phaser, using Webpack 5, I receive 404 for the skeleton.png asset.
// File: skeleton.atlas
skeleton.png
size:2046,1890
filter:Linear,Linear
...
Spine2D's atlas ...
2
votes
2
answers
250
views
When in development mode, unable to GET bundle.js file, fails with 404 Not Found [closed]
While trying to run the application locally, browser is not able to load bundle.js:
This is the setup to load bundle.js inside index.html:
<script type="text/javascript" src="/...
1
vote
1
answer
41
views
Webpack does not preserve the directory structure of output HTML files
First, I'm migrating a project from gulp and from the Foundation for Sites SCSS framework to webpack and a different SCSS framework. The project makes a site for a text-heavy law school casebook.
I am ...
2
votes
0
answers
34
views
Unusual Gulp Task Behaviour
I am struggling with a Gulp Task and what it is doing.
Let me start with the first task:
gulp.task('html-template:join', (cb) => {
gulp.src('./src/template-data/**/*.json')
.pipe(...
1
vote
0
answers
42
views
Webpack Configuration
I have folder structure like below
temp
|- package.json
|- package-lock.json
|- webpack.config.js
|- /src
|- /components
|- /button1.js
|- /button2.js
|- /id_selectors....
1
vote
0
answers
148
views
JIT compilation failed for injectable class. angular 18 and webpack 5
bootstrap:19 JIT compilation failed for injectable class a{static{this.ɵfac=i["ɵɵngDeclareFactory"]({minVersion:"12.0.0",version:"18.2.13",ngImport:i,type:a,deps:[],...
1
vote
1
answer
260
views
CSS files have a lot of unwanted code after running npm run build
I have created Webpack 5 demo for plain HTML, CSS and JS using TailwindCSS v4.
GitHub: sanketpbhamre/tailwind-4-webpack-5
Webpack CSS configuration
module: {
rules: [
{
test: /\.(s[ac]|c)...
0
votes
0
answers
114
views
Angular 13 - Uncaught SyntaxError: application died in status LOADING_SOURCE_CODE: Unexpected token '<'
I am using Single-SPA-angular version 4.0.0 in micro-front-end and Single-SPA in Root application.
My package.json contains below packages for webpack :
"webpack": "5.97.1",
"...
0
votes
0
answers
248
views
How to configure Webpack in Next.js to avoid chunk duplication for shared files?
I have a problem with the way webpack bundles my files.
Consider the following files:
// utils/index.js
export const funcA = () => {
return "funcA in CompA";
};
export const funcB = ()...
0
votes
1
answer
271
views
webpack-dev-server WebSocket error: read ECONNRESET at TCP.onStreamRead
I'm facing this problem for a websocket proxy ws/**:
<i> [webpack-dev-server] [HPM] Upgrading to WebSocket
<e> [webpack-dev-server] [HPM] WebSocket error: Error: read ECONNRESET
<e> ...
1
vote
1
answer
239
views
"ReferenceError: exports is not defined" after update to Node 22.12 from Node 22.11
After I upgraded our project from Node 22.11 to Node 22.12, I am unable to build and run the project using webpack. Problem is caused by Node 22.12 and its newly introduced functionality require(esm) ...
0
votes
2
answers
398
views
Cannot get a simple cube to load using React-Three-Fiber
I am using the react-three-fiber getting started doc to render a cube on a page but nothing shows and I am at a bit of a loss.
Link: https://r3f.docs.pmnd.rs/getting-started/your-first-scene
I am ...
2
votes
1
answer
292
views
Override Subresource Integrity algorithm for Angular builds
I am using Angular v17 and configuration allows for setting subresourceIntegrity to true which will add the integrity hash to the <script> tags that import the compiled Angular project.
This is ...
0
votes
1
answer
66
views
Webpack 5 hot reload from different port (seperate application using the build)
The issue I'm stuck on is hot reload is trying to go to localhost:8000/build (where the application build is being used)
instead of localhost:3000/build which is the webpack-dev-server build location.
...
0
votes
0
answers
183
views
Creating Micro-frontend application in nextjs using webpack
I am using nextjs@14 version.
here is my next.config.mjs
export default (phase, { defaultConfig }) => {
//console.log('defaultConfig =>', defaultConfig);
/**
* @type {import('next')....
1
vote
2
answers
70
views
Extract css per entry point in webpack
Anyway to tell webpack in a project with multiple entries to include only respective css for each entry?
Seems like it extracts all css across all entries, puts them under vendor.css and includes that ...
0
votes
1
answer
52
views
Webpack 5 DLL module resolution react context issues
I'm currently working on a project that relies on React Material UI as a dependency. One of the components uses react context to handle styling. I had to upgrade the project from webpack 4 to webpack ...
2
votes
0
answers
214
views
Angular and Webpack keep throwing exception on invalid CSS comment syntax
I am building an Angular app, and I use npm run ng serve to build it. I use the latest Webpack 5+, and keep getting errors about my CSS files:
Build at: 2024-11-17T02:48:50.801Z - Hash: ...
1
vote
1
answer
81
views
Error in the schema entry point webpack 5 multiple entry point
I was setting up a React project for a Chrome extension in which I needed more than one entry point and output in webpack, but I got an error when trying to configure more than one entry point in the ...
0
votes
1
answer
66
views
Despite loading core-js & regenerator-runtime I still can't get async/await to work for my JavaScript with WebPack
An async/await call doesn't work. I loaded core-js and regenerator-runtime to fix that but it still isn't working. I'm guessing it's a matter of the proper components. That's why I posted my ...
1
vote
0
answers
412
views
Ejected create-react-app and v5 webpack migration - onBeforeSetupMiddleware and onAfterSetupMiddleware
I maintain a project for my job that was built using create-react-app. We have strict compliance standards for removing issues, which led to us ejecting said project a while back. An issue on webpack-...
1
vote
2
answers
1k
views
Webpack 5 Module Federation - Shared library issue
I have an npm module which I'd like to share between my host and remote apps, but when I'm debugging the app, it is obvious that for example a singleton class (from the npm module) is instantiated ...
0
votes
2
answers
353
views
Package "@angular-builders/custom-webpack" was found but does not support schematics in angular 17
My angular json
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects&...
0
votes
0
answers
91
views
React (TypeScript) - Unable to Use Process Environment
I am working on building my first React application (using TypeScript), however I am running into an issue building the application while trying to use environment variables. My folder structure is:
...
0
votes
0
answers
122
views
Bundling js and css with Vue and Webpack
I am trying to optimize a Vue (v3.2)+Webpack (v5.8) app, and I haven’t been properly introduced to Vue. I have tens of css and js references in my index.html. Those css'es and js'es are currently in ...
0
votes
1
answer
125
views
How to pass requested headers with webpack5 proxy?
I have a reactjs app with webpack5. There is a CORS problem. I use webpack devServer with proxy. But the main problem is webpack proxy doesn't pass original headers which is needed for authorization.
...
2
votes
0
answers
1k
views
webpack.config.ts unable to use ts-loader for TypeScript files
I am beginning a new project which will be a React TypeScript website package, and I would like to use webpack to bundle and serve my website artifacts.
I have installed webpack, webpack-cli, and ...
0
votes
1
answer
55
views
Image won't load in webpack build
slider.js
...
const initialize = (pImages) => {
pImages.forEach((image) => {
const sliderItem = document.createElement("img");
sliderItem.src = image.src; // this line result ...
1
vote
1
answer
184
views
Multiple Webpack bundles cause Bootstrap script to not work
I got this setup:
core.js
import * as bootstrap from 'bootstrap';
import { Popover } from 'bootstrap';
//...code doing some stuff with Popover
someFancyPlugin.js
import { Popover } from 'bootstrap';
/...
0
votes
1
answer
678
views
Webpack v5 - Can't disable chunks
I have multiple entry points in my webpack config and I want each entry point to bundle into its own folder with nothing
import path from 'path';
import webpack from 'webpack';
import TerserPlugin ...
0
votes
1
answer
100
views
Bundling for "Isolated Worlds" in Chrome Browser Extension
I'm thinking about how I can structure my code.
Since some code in Chrome Browser runs in "Isolated Worlds", little VMs, I have trouble bundling my Javascript without creating a lot of ...
1
vote
0
answers
36
views
Prevent webpack to add delay mechanism to an inlined script
I'm new with webpack and I don't understand at all why my webpack configuration is adding a delay mechanism at the end of the builded script, something like this:
var t = o.O(void 0, [4998], (() ...
1
vote
1
answer
231
views
Configuring Different Versions of Shared Library for Shell and Microfrontends
I am working on a project using Module Federation with a shell application and three microfrontends (a, b, c). I need to configure the setup so that:
The shell application uses [email protected].
Each ...
0
votes
1
answer
836
views
Webpack module federation directory share
I'm starting a new project and I want to reuse my components from an existing project.
Following tutorials, I was able to share js and react files, as well as images and other media. However, instead ...
0
votes
0
answers
254
views
Use hash in remote module URL for webpack module federated components
I have a app that loads some module federated components. For example:
module.exports = {
plugins: [
new ModuleFederationPlugin({
name: 'app',
remotes: {
remoteComponent1:'...
0
votes
0
answers
100
views
issue with bootstrap conflict used with WebpackJS and shadow Dom
I have widget app using boostrap and bootstrap icons
all this is bundled via Webpack js 5
I had huge difficulties to make bootstrap icons to be loaded correctly but now it's working.
the only problem ...
-2
votes
1
answer
616
views
How to load host component from remote app using module federation?
I'm new to the module federation and having some issue while loading host app, when using Host(React+vite) and Remote(angular18+custom-webpack).
Remote : custome-webpack.config.js
const ...
2
votes
0
answers
366
views
Webpack 5: Module not found: Error: Can't resolve 'stream' in 'probe-image-size' module
Here is the image of error
I am encountering an error while using Webpack 5 with the probe-image-size library in my project. The error message I get is:
ERROR in ./node_modules/probe-image-size/lib/...
1
vote
0
answers
64
views
How to get url path for CSS at runtime?
I use CSS Modules.
I don't need resolving of url, but I need replace url paths with my custom function call so that I could get the full url at runtime by myself with my custom logic.
For example,
&...
0
votes
0
answers
396
views
Use web component in react-native-expo using module federation
I want to use microfrontend of web-component in react-native-expo using module federation. There are 4 different microfrontends 2 of them required some request parameters. I tried to Re.Pack package ...
1
vote
1
answer
52
views
Can HtmlWebpackPlugin use only the bundles in the [name] folder?
I have a webpack.config.js that scans a config folder to build different bundles in different output folders so that each of those output folders can be a standalone website. For each of those output ...
0
votes
1
answer
129
views
Module federation in angular webpack and nx build different files with exact same project settings
We have implemented module federation with nx. In a poc project we created a shell and a remote project with all default settings with angular 18.0.3 ( in the poc 18.0.2) and ng/angular 19.1.2
In the ...