All Questions
4,149
questions
0
votes
0
answers
12
views
terser-webpack-plugin and uglifyjs-webpack-plugin
Since webpack 4 is using terser-webpack-plugin by default in production mode or when we specify -p argument which is a shortcut for specifying --optimize-minimize --define process.env.NODE_ENV="...
0
votes
0
answers
47
views
Why Sentry throws "Invalid token" (http status: 401) error for a valid token?
I've got a next.js application that connected to sentry and I'm confident about the token, But when I tried to run npm run build in my app to get output I faced Invalid token (http status: 401) error.
...
-1
votes
0
answers
10
views
Rendering webpack bundled is code on html
I have compiled react component into a js bundle using webpack. Importing this into other react projects works just fine.
Is there any way to render this js file on a normal html file, without using ...
0
votes
0
answers
19
views
How to build from webpack 4 to without breaking Content-Security-Policy of not using 'unsafe-eval'?
I'm trying to build through webpack 4 & npm . i facing issue of "EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the ...
1
vote
0
answers
20
views
Webpack Duplicate Image File Issue and 404 Error with React App
I am working on a React project with Webpack to bundle my assets. My issue is that Webpack is creating duplicate image files in the dist/images directory, and my application is also encountering a 404 ...
0
votes
1
answer
46
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 ...
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
46
views
Missing loader using MUI date picker storybook
I am unable to use MUI date picker in a storybook with the below error
ERROR in
./node_modules/@mui/x-date-pickers/DesktopTimePicker/DesktopTimePicker.js
45:52 Module parse failed: Unexpected token (...
0
votes
0
answers
28
views
Icon Component with Dynamic SVG Imports vs Bundle Size next.js - v14.2.3
I am trying to create an Icon component in a Next.js application that imports SVGs dynamically without significantly increasing the bundle size. Despite using various methods such as require.context(),...
-2
votes
0
answers
59
views
Error while running react - electron in browser - Uncaught ReferenceError: require is not defined
I am tryin to make a electron - react application and while running i am getting a error on the console of the browser.
Uncaught ReferenceError: require is not defined
at Object.events (bundle.js:...
1
vote
1
answer
69
views
Export React as one inline HTML file
I am making one-page websites for particular service that accepts only single inline html files. I want to make these webpages as modularly as possible (to make many versions of them) and am thus ...
0
votes
0
answers
26
views
Why is my image not loading properly in my NPM React Package
I am developing a React component library for a Phone Frameset that holds screenshots of apps.
I'll provide the files with the project structure right now. Maybe the issue is from one of the config ...
0
votes
0
answers
34
views
How to expose a React component from host application to a module federated child application in Micro Front End Architecture?
I was exploring the Microfront End Architecture, and I found this very useful github repo https://github.com/nebarf/module-federation-react-router-dom
My usecase is I want to expose a component from ...
1
vote
0
answers
50
views
How to get fatal error for typescript errors [duplicate]
I am using React with TypeScript and webpack. Currently, when I write code with TypeScript errors, VS Code displays the following errors:
Expected 2 arguments, but got 1.ts(2554)
MobileDatePicker.tsx(...