Category "webpack"

Remove some code lines in production distribution files?

I'm using Babel and Webpack to generate ES5 code from ES6. There are some validations that is used to reduce the mistakes i do while coding. class Logger {

How to setup react properly

I have been following the react setup instructions on codecademy: When I type in "npm run build" into the terminal I get this error: I can't seem to figure out

CopyWebpackPlugin copy contents of a directory into the output directory

I want to use CopyWebpackPlugin to copy all the files from a public/ directory to the dist/ directory. However, I need to set my output path as dist/ earlier in

Using formula.js on vue.js

I am trying to use formulja.js in a Vue project. When I import it and try to use PPMT function I am getting this error. I can't define what the error is and how

Webpack 4 file-loader changes svg file content to __webpack_public_path__

I have a project that uses Webpack 4. I use file-loader to handle images in html and fonts in the styles. But for the images, file-loader creates the image in d

Karma/Jasmine times out without running tests

I'm trying to run Karma/Jasmine from Grunt on a project generated with http://newtriks.com/2013/12/31/automating-react-with-yeoman-and-grunt/ Karma launches P

I am getting an error of Html Webpack Plugin in reactjs

My Application was working fine but when I installed material ui npm package my application is giving me this error. Html Webpack Plugin: Error: Child comp

webpack-dev-server error after migrating to angular 13

After my migration from angular 12 to angular 13, i am getting the following error in the console: Also if i change something in my code the browser does not r

CSS Modules Breaking in Production with Create React App

I'm using css modules in a create-react-app project (React V17.0.2 / React-Scripts V4.0.3). All seems well in local but the styles break in production (hosted

i tried to Polyfill modules in webpack 5 but not working (Reactjs)

Hi guys am a newbie in React when i start my project i get the Wepback V5 Error Message Resolve updated : https://github.com/facebook/create-react-app/issues/11

TailwindCSS 3.0 Upgrade overriding button styles

Problem: Button class being overridden by default tailwind base classes. Not sure why my classes on the element aren't being applied. Question: How can I get my

Unexpected token (16:22) You may need an appropriate loader to handle this file type

I get this error when I start my react project with npm start. Doesnt let me move forward at all. ERROR in ./node_modules/react-csv/src/components/Download.js

How can I mock Webpack's require.context in Jest?

Suppose I have the following module: var modulesReq = require.context('.', false, /\.js$/); modulesReq.keys().forEach(function(module) { modulesReq(module);

plugin is not working in Webpack with React JS

I am creating a React JS app. I have installed terser-webpack-plugin to both try to compress my code as well as remove console.log() statements. However, it doe

CSS background-image not showing, but does when I apply style to the element in dev tools?

I am using Webpack to load an image to use as a background image. When I apply it using CSS, the div takes on any property I give it other than a background ima

Error with docker and react, digital envelope routines::unsupported

I have enrolled in a docker course and the instructor has provided a starter project with some rather old react code. I dockerized the react project, here's the

React-router did not work on production

there, I am using react-router for this app. It works fine on my local server. Here is the code: var routes = ( <Router history={browserHistory}> <

webpack try to require a module that might be missing

I want to try to require a module in a webpack build and if that file is not found just do nothing, don't throw an error etc. I tried doing it this way: try {

ant design customize theme vue

i got my vue3 application setup so far with tailwind, and ant design but can't customize ant design theme i am following this guide i got this error error in

Using webpack to load CSS files from node modules

I'm trying to use a react component that includes a css file. I'm requiring the component as usual: var Select = require('react-select'); I'd like to know ho