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
42,798
questions
0
votes
0
answers
34
views
JScript module export not recognized using Webpack & Typescript
Problem
I have a function named index declared with export in a Jscript file, when trying to use it I get an error message telling "does not provide an export named 'index'"
This is a long ...
-1
votes
0
answers
27
views
Next.js Build failed because of webpack errors: CssSyntaxError
I've been stuck and going all over internet trying to figure something that prevents my app to be build on Vercell (well locally as well).
npm run dev - works great, no issues
stylelint and eslint ...
0
votes
0
answers
29
views
Failed to decode downloaded font react project
I'm encountering an issue where I'm getting a "Failed to decode downloaded font" error when trying to load fonts in my project. Here's how I've set it up:
I have the following @font-face ...
0
votes
0
answers
12
views
Webpack does not bundle a package imported by an imported package
I have a project that uses Webpack.
This project uses package A that exposes a single file index.js.
In that file there's an import from @mui/material/styles. @mui/material is listed as a peer ...
0
votes
1
answer
18
views
Angular 18 google-auth-library errors (Webpack)
I'm getting a series of errors when running no serve with my Angular app, which is currently the latest version after installing google-auth-library. The errors are -
BREAKING CHANGE: webpack < 5 ...
-1
votes
0
answers
25
views
Can't find MUI image, returns "431 (Request Header Fields Too Large)"
I'm quite sure that this is related to how webpack works with MUI.
We used to have a div with a class that had a background-image:
.hero-image {
// .. stuff
background-image: url("../../...
1
vote
0
answers
21
views
Dynamic import of package in my NPM library
Hej. I have dynamic import of animation library lottie in my component like:
const { default: lottie } = await import(
/* webpackChunkName: "lottie-web" */ "...
0
votes
1
answer
35
views
Webpack raw-loader/style-loader importing CSS file as JavaScript string instead of CSS content
I am using Webpack to build my chrome extension and I am trying to import a CSS file as a string so that I can inject it into a shadow DOM. However, when I import the CSS file, it is imported as ...
0
votes
0
answers
18
views
How to attach url params to webpack dev server host?
I use webpack dev-server with npm and having simple config file all works perfectly except that I would like to have dev-server runnning the browser with additional url params attached to 'host' url.
...
1
vote
0
answers
33
views
Is it possible to remove (0,...) expression from Webpack generated code?
Webpack will generate this code
import { useState } from 'react';
useState(0);
into this code
(0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
// which can be later minified into this code
// (0,...
1
vote
0
answers
24
views
Run JS from bubble (import failing) [duplicate]
I've got a simple HTML element in Bubble.io that I'm trying to run javascript from. I keep getting import errors:
Either it isn't a module and I can't use import
Or
It doesn't recognize exported ...
0
votes
0
answers
51
views
How to avoid imports that are not used?
I have class A which imports class B just to have an enum defined in class B.
However, class B has heaps of imports that are useless to class A, and that increases the JavaScript size when the user is ...
-1
votes
0
answers
27
views
Impossible to use symfony ux react in a sylius project
I am currently working on a Sylius project and I would like to be able to use react components easily via twig. So I wanted to turn to Symfony ux react but it was impossible to load the components...
...
0
votes
0
answers
24
views
react version in hoist-non-react-statics file generated after build
I'm using viteJS with React for my web app. after running the build command npm run build it generate a hoist-non-react-statics-DD3vAyqj.js in assets folder, my actual react version is v18.3.1 but in ...
0
votes
0
answers
29
views
How to use repack build multi bundle?
I'm trying to use repack in React Native to split my codebase into multiple bundles, but I'm facing some challenges. I've installed repack following the documentation and attempted some configurations,...