Category "webpack"

Unable to set property 'wrap' of undefined or null reference

I'm building a bundle with webpack + babel for browser, targeting it to ES5. When I try to use it, an error Unable to set property 'wrap' of undefined or null r

How to Polyfill node core modules in webpack 5

webpack 5 no longer do auto-polyfilling for node core modules. How to fix it please? PS: I'm a beginner in development so solution must be well described fo me.

Webpack: How to export directly to global (without .default) containing stylesheet imports?

Context I have a webpack.config.js like this: /* Something here */ module.exports = { entry: { main: './src/index.js' }, output: { library: 'MyCl

How to avoid duplication of module "bn.js" in webpack production build?

I used webpack 4 for my app. Somehow, bn.js package takes up a lot in production build. The image shows that it takes up 594.22 KB of data. Is there any way to

Log current time during webpack watch

I'm trying to improve developer experience with webpack, and I want to log the current time when running watch command, so I know when an error occurs behind th

Webpack: 404 image not found

If I set image src in my html file, I am able to get the image. But when I use my script file to set the image src, the console keeps saying image not found(404

How to integrate a React webapp inside a spring boot Application with jar packaging

We have a react webapp and a spring boot application(built with maven) in development. The React app(on npm) and boot app are running separately but time has co

Dualboot Angular13 and Angular1: cannot downgrade injectable services with parameters

I have dual boot with Angular 13 and Angular 1. The app is built with webpack v5. The tsconfig has key "emitDecoratorMetadata":true. After install I run NGCC on

@capacitor-community/http plugin import bundled with webpack throws SyntaxError in Android Studio

I am importing @capacitor-community/http plugin in a .js file: import { Http } from '@capacitor-community/http'; which is then bundled with webpack in

React - Cannot find module fs and require is not defined

I am using React to build a web app. I never called fs in a file and everything worked fine until I suddenly got this error: Uncaught Error: Cannot find module

How to distinguish files which have the same name but in different sub-folders in sourcemap?

In my VUE project, there are several templates which have the same filename but located in different source sub-folders. I'm using webpack 3.12 to build it, and

React + Webpack 5 + Babel 7 IE11 issue -- not attaching to root

I have been scouring the internet for solution after solution and nothing seems to be working for me so I'm requesting help. Issue: No matter what I do, I can't

Webpack 5: file-loader generates a copy of fonts with hash-name

I cant figure out whats going on here. I use the file-loader to load the fonts of my application: { test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,

webpack file-loader does not load background image

I've been having this problem for a while and I see that other people have it too, but even though I have the same code as them it is still not working and I do

NuxtJS ignore webpack/chokidar watchers for specific file or folder

I'm using NuxtJS' serverMiddleware for logging. It works on every route. import { logger } from './utils/logger'; module.exports = function(req, res, next){

How to deploy React client and Node server (Both in a single git repository) in Heroku?

Am having a single Git repository where it contains both client and server. This is my Webpack.config.js const path = require("path"); module.exports = { d

How to resolve fs.existsSync is not a function

In NodeJS I have: const fs = require('fs'); if (!fs.existsSync("some_path")) { ... } But I get the error: TypeError: fs.existsSync is not a function Af

Webpack module federation lazy loading remoteEntry.js

Am I able to lazy load apps' entry files when I am using React with ReactRouter? When I enter page there are many requests for remoteEntry.js files for each app

Some Bootstrap 5 colors are not working compled with Laravel Mix

I am integrating Bootstrap 5 into my Laravel project. I installed Bootstrap with NPM and complied with Laravel Mix, and it's working. However, some extra colors

Load GLB model with Webpack - Three.js

I'm trying to use Webpack for the first time and I have trouble to add my glb model. My model is ok, used many times and I put in public folder. I dont' underst