Skip to content
Advertisement

Tag: webpack

Using sass with Antd and CRA

I am trying to integrate SASS with antd and CRA. I followed many tutorials but most of them were created years back and all of them throw some error. Somehow I found an article which is working fine link But I am worried that above solution is a hacky way of integrating SASS, so some day it may stop working.

Can`t resolve image.png in styles.css

Webpack cant build the project, because cant resolve image. Project structure Here is webpack.config.js and main.css Error message Answer Seems like url() should take a string as a parameter see here So try in main.css (and make sure that the relative path to bg.png file from main.css one is correct):

Build version of react app giving wrong links to CSS and JS files

I’ve been working on a simple React project named Simple-portfolio, Github repo: https://github.com/Devang47/simple-portfolio live site url: https://simple-portfolio.pages.dev/ This project is working fine in the development server but after building the app, in index.html the link to other files is getting wrong. for ex: Errors on the console of production build: What I’ve tried till now: Deleting node_modules Deleting lock files

Webpack : Cannot read property ‘readFile’ of undefined, No output files

Using webpack > 5 version. Below is my appDevMiddleware.jscongifuration When i do npm start of my React App, i’m getting This is exactly showing here I will have to somehow use the promises for readFile which is something like const { readFile } = require(‘fs’).promises How should i replace const fs = middleware.fileSystem; with promise for this issue? Answer webpack-dev-middleware

Receiving ERROR #98123 after gatsby develop

I’m receiving this error after I run gatsby develop. I have tried following the steps from gatsby.com Not sure the reason for this error. I have tried gatsby clean, removing files that were giving errors, and utilizing google. I have posted on GitHub and discord, but have not received any updates yet. Any assistance is appreciated. Answer It looks like

Advertisement