All Questions
4,136 questions
0
votes
1
answer
42
views
How to use getStaticProps in app/ Page component
I think that Page.tsx belongs to app/.
In src/app/Page.tsx, the MRE:
export default function Home({ images: { poze } }: {
images: {
poze: string;
}
}) {
return poze;
};
export const ...
0
votes
1
answer
48
views
How to use useState without "use client" in Next.js when I use generateStaticParams
I need this in an SSG to send to photo galleries the image files' dimensions. I expected no error.
Error of "npm run dev":
21:23:44 ~/Desktop/Pro/home-gh-pages main $ npm run dev
> home-...
0
votes
0
answers
35
views
OTS parsing error: invalid sfntVersion: 1702391919 Error Semantic UI
I started a small project in react + webpack in which I tried to use the components proposed by Semantic UI, here, I set up a small search form which contains an icon proposed by Semantic UI, but at ...
0
votes
0
answers
65
views
I can not import any components from my own React component library
I am developing a component library for the components we use in common in our projects.For now only one button has been added.
-> main_folder -> lib -> Button -> index.jsx
export function ...
0
votes
0
answers
79
views
How to Implement historyApiFallback Rewrites in Vite?
I'm migrating a project from Webpack to Vite and trying to replicate this Webpack devServer configuration:
historyApiFallback: {
rewrites: [
{
from: new RegExp('^' + appConfigs....
2
votes
1
answer
98
views
Can't resolve 'querystring' in old dependency
I have an old React app which I'm trying to run locally, but I encountered some issues regarding querystring and pollyfils. Here are my files:
packages.json:
{
"name": "test-immersion&...
0
votes
2
answers
77
views
Vite Build Fails with 'Failed to Resolve src/indexReact.js' Error in React Project
vite v6.2.0 building for production...
file:///C:/Users/abcd/project/node_modules/vite/dist/node/chunks/dep-ByPKlqZ5.js:41876
new Error(Failed to resolve src/indexReact.js from C:/Users/abcd/project/...
0
votes
0
answers
97
views
React Refused to load the script bundle.js because it violates the following Content Security Policy directive script-src-elem 'none'
I have huge troubles getting CSP to work. Background is, I was creating a new web application based on react. The deployment should happens on Azure "Static Web Apps". Thus, the JavaScript ...
1
vote
1
answer
277
views
How to implement clear cache, cache busting for Module federation in React? (For both host and child modules)
I recently encountered an issue whereby the browser always cache the previous version even though a newer version of deployment has been released. The users always need to keep on refreshing or ...
1
vote
0
answers
52
views
CSS Files in Devtool-Inspector are not clean
CSS Files in DevTools Inspector Contain JavaScript and Appear Duplicated
I'm encountering a strange issue in Chrome DevTools (Inspector) while debugging my project. The CSS files are not clean—many of ...
0
votes
0
answers
141
views
Streamlit app is not displaying the custom component due to frontend asset loading issue
Problem Description
I'm integrating a custom JavaScript component with a Streamlit application. When I run app.py, the app displays an error message in the browser indicating it cannot load the ...
0
votes
0
answers
23
views
File pathing & access across app, design system, and 3rd party lib
Running into an issue where a 3rd party library (intl-tel-input) that's used in a design system library (my-design-system) as part of a "UserProfile" component has some broken visual styles ...
1
vote
0
answers
24
views
Configured webpack with scss module gives error Module Build Failed expected {
I am trying to use scss modules in my React app but getting error.
I configured my react app using webpack, now when I went on to configure scss modules, i got this error. The webpack build is failing,...
4
votes
1
answer
217
views
TypeScript issues when dynamic loading [closed]
I have a file with icons being exported from images.ts:
export { default as SvgArrow } from './arrow.svg';
export { default as SvgCopy } from './copy.svg';
...
export { default as SvgWater } from './...
1
vote
0
answers
72
views
.d.ts errors in the build package after lazy loading got introduced
I'm working on the React package for a design system and noticed that some of the components using have all the .svg in the built package output. Because of that my package size was 4mb.
I introduced ...