42,364 questions
Score of 10
1 answer
13806 views
React- Webpack: Cannot read property 'tap' of undefined
I have a React application configured with Django Application. I have different webpack config files for development and production, When I run "npm run start", it gives me error that:
Cannot read ...
Score of 0
2 answers
17512 views
warning Invalid next.config.js when running project - nextJs
When I want to run my project i have these three warnings:
1-
warn - Invalid next.config.js options detected: The root value has an unexpected property, webpack5, which is not in the list of allowed ...
Score of 4
3 answers
10616 views
Unable to load fonts
I get the following error when I try loading fonts into the Spectacle boilerplate:
Failed to decode downloaded font: http://localhost:3000/assets/fonts/Overpass-Bold.ttf
OTS parsing error: ...
Score of 2
7 answers
5928 views
React microfrontend with Module Federation
I consider to create microfrontend with Webpack 5 Module Federation as described on https://indepth.dev/posts/1173/webpack-5-module-federation-a-game-changer-in-javascript-architecture.
Has anyone ...
Score of 0
2 answers
11528 views
Javascript bundled with webpack not working
So basicaly I can't get any of my javascript to work after linking bundle.js onto my index.html. Every function is undefined even tho bundle.js is being loaded and I can access it via source code in ...
Score of 0
4 answers
164 views
Find all `*.html` but not `*.tpl.html` using JavaScript regex
I have a large project that has many *.html files and many *.tpl.html files.
I want to use a regular expression that allows me to differentiate between these two for my Webpack config.
I have tried ...
Score of 4
1 answer
18046 views
Nextjs build errors, verbose logging shows nothing
I'm using the latest version Nextjs. The project is running fine when testing and running in developer mode. When I try a production build npx next build --debug I get the error below. The output ...
Score of 16
1 answer
17920 views
webpack 5 - Parsed request is a module
I'm creating webpack5 setup for an small app and while doing I'm facing the below mentioned issue. Please suggest the way to resolve
Issue Snapshot
Module not found: Error: Can't resolve 'faker' in 'C:...
Score of 3
4 answers
31558 views
Changing the text color of a react-bootstrap Navbar using webpack
I'm trying to customize the colors of a react-bootstrap Navbar.
This is the contents of my NavbarComponent.cs file:
var React = require('react');
var ReactDOM = require('react-dom');
import Navbar ...
Score of 6
1 answer
13501 views
How do I inject a CSP nonce into Angular's auto-generated script tags?
The Angular docs mention CSP, and Google's Security Engineers recommend against using whitelists. What I haven't figured out yet is how to inject a nonce into the script tag(s) that Angular injects ...
Score of 2
3 answers
19941 views
Uncaught TypeError: Cannot read properties of undefined (reading 'split')
I'm using webpack, and I'm getting this error in the browser:
Uncaught TypeError: Cannot read properties of undefined (reading 'split')
at eval (validator.js:15)
at Object../node_modules/axios/...
Best practices
2
votes
0
replies
73
views
How can I measure whether React dynamic imports are actually improving application performance?
I am working on a large React application and have started using dynamic imports with React.lazy() to reduce the initial bundle size.
Example:
const Dashboard = React.lazy(() => import('./Dashboard'...
Score of 1
1 answer
98 views
Insert script into HTML head section when in development and not in production
I want to insert the below script tag into my popup.html and options.html when compiled in dist folder:
<script src="http://localhost:8097"></script>
I need this to be the first ...
Score of 425
12 answers
615358 views
How to add fonts to create-react-app based projects?
I'm using create-react-app and prefer not to eject.
It's not clear where fonts imported via @font-face and loaded locally should go.
Namely, I'm loading
@font-face {
font-family: 'Myriad Pro ...
Score of 1
0 answers
281 views
How to export my library images without embedding images in JS files
I've developed a library which has some images.
I'm using file-loader in order to export them in my production into a 'res' folder. So my distribution folder look as follow
./dist
--- my.core.js
--- ...