Skip to main content

Questions tagged [webpack]

Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it can also transform, bundle, or package just about any resource or asset. Webpack takes modules with dependencies and generates static assets representing those modules. Webpack enables extensibility and promotes best practices in web architecture and performance.

webpack
0 votes
0 answers
16 views

Problem when requiring packages bundled with webpack

I'm able to use libraries with node like: const API = require("api"); const Service = require("service"); however, when I bundle the js file with webpack, it doesn't work and I ...
user17952421's user avatar
-3 votes
0 answers
19 views

webpack is not loading my image.. what will i do to this error message [closed]

ERROR Error: Child compilation failed: Module Error (from ./node_modules/html-loader/dist/cjs.js): HtmlSourceError: Bad value for attribute "src" on element "img ": Must be ...
Ibedu Chidera's user avatar
0 votes
0 answers
10 views

Build failed in Storybook webpack config caused by svg

this error occurs when launching storybook, all svg that i use in the application cause an error in ./src/shared/assets/icons/about-20-20.svg ...etc Module build failed (from ./node_modules/@svgr/...
frik's user avatar
  • 1
0 votes
0 answers
9 views

Can't resolve './zstd.win32-x64-msvc.node' in ...node_modules/@mongodb-js/zstd

I have a react node js typescript project I'm working on via my m2 chip mac where I'm trying to get MongoDB and mongoose setup on. I've installed the basic mongodb package via npm and am getting the ...
Niko Icardo's user avatar
0 votes
0 answers
13 views

NativeScript services error when try use a axios or other webservice library. webpack errors

I create a simple android hello-world project (nativescript angular) latest or v17 and it run normal, then I install axios npm i axios if I try a simples get a lot errors happens. I installed some ...
Diego Venâncio's user avatar
0 votes
0 answers
10 views

Typescript import cannot resolve path to node_module

I am working on a typescript project, trying to import 'path'. It's for a Figma plug-in so I followed their getting started guide (https://www.figma.com/plugin-docs/libraries-and-bundling/#bundling-...
Alexander's user avatar
  • 1,969
0 votes
0 answers
13 views

webpack < 5 used to include polyfills for node.js core modules by default. how to fix this issue

------------- REASON FOR ISSUE ------------ Before we are using node js version 16.17.0 in react js project and now wanna to upgrade in latest node js lts version which is 20.15.1 but there is issue ...
Kamlesh Singh's user avatar
0 votes
1 answer
19 views

Angular - Esbuild chunk sizes do not match build output when served

I recently switched my Angular app to v18 and moved from webpack to esbuild. However, when comparing my chunk sizes with code splitting, I see the sizes do not make sense. When using webpack, my ...
Cody Pritchard's user avatar
0 votes
1 answer
14 views

Browser not calling the entry point in react bundle.js

I have a relatively simple react app that has been working fine for the past few months in production. After converting it from JavaScript to TypeScript, the main function (entry point) doesn't even ...
Dr Phil's user avatar
  • 659
0 votes
0 answers
32 views

Confusion about javascript modules and webpack: The requested module ... does not provide an export named 'default'

I am trying to set up webpack in our javascript project and we want to write new javascript es6 classes, bundle them via webpack and then reuse the packages. I set up a simple example where i define a ...
flixe's user avatar
  • 626
0 votes
0 answers
5 views

Webpack bundling with shared dependencies and no extra bundle

Is it possible to have two bundles that import the same dependency but don't cause code duplication without having to add a script tag for a bundle like shared.bundle.js? For example: entry1 // ...
HelloWorld's user avatar
0 votes
0 answers
17 views

React compiler, how to setup with craco/webpack

I migration in 18 to 19 react today. Read documentation, installed packages babel-plugin-react-compiler , for eslint eslint-plugin-react-compiler. I'm not that good at setting up webpack, but from the ...
Mr. Emil's user avatar
0 votes
1 answer
37 views

How do I trace errors in Next.js?

Error tracing is quite difficult in Next since it shows the path of the file in the build folder, how can I trace back to where the error originally occurred in my project folder structure? I have ...
OmarAbouzeid95's user avatar
1 vote
1 answer
31 views

Angular 17 ESBuild Configuration for environment variables

Just migrated from Angular 15 to the 17. And currently it is possible to build and serve with esbuild instead of webpack. With webpack there was a way use a custom webpack config for things like, ...
Semedmar's user avatar
0 votes
0 answers
29 views

Uncaught runtime errors: ERROR process is not defined

My npm start has about 58 errors, almost all of them in webpack.config.js. Now, when I stop Ctrl-C and restart (npm start), my browser shows the pictures below. I've stopped and restarted my back end ...
David S's user avatar

15 30 50 per page
1
2 3 4 5
2852