Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

201
Vistas
ReactJS when add proxy to package.json css modules stop working

I add in my package.json proxy for making request to server runing on other port.

after that, my module css styles stop working, in the devTools i found that the styles are loading well, but classnames for DOM elements are not loading at all.

How it looks now:

enter image description here

How it should be:

enter image description here

some page code:

import styles from "./LoginPage.module.css";
export default function LoginPage() {
 return (
          <div className={styles.LoginPage}>
         </div>
     );
}

Here is my package.json:

{
    "name": "job-bot-admin-panel",
    "version": "0.1.0",
    "private": true,
    "proxy": "http://localhost:8000/",
    "dependencies": {
        "@reduxjs/toolkit": "^1.8.1",
        "@testing-library/jest-dom": "^4.2.4",
        "@testing-library/react": "^9.5.0",
        "@testing-library/user-event": "^7.2.1",
        "http-proxy-middleware": "^2.0.4",
        "multiselect-react-dropdown": "^2.0.21",
        "react": "^18.0.0",
        "react-dom": "^18.0.0",
        "react-redux": "^7.2.8",
        "react-router-dom": "^6.3.0",
        "react-scripts": "^0.9.5",
        "react-select": "^5.2.2",
        "web-vitals": "^2.1.4"
    },
    "scripts": {
        "start": "react-scripts start",
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
    },
    "eslintConfig": {
        "extends": "react-app"
    },
    "browserslist": {
        "production": [
            ">0.2%",
            "not dead",
            "not op_mini all"
        ],
        "development": [
            "last 1 chrome version",
            "last 1 firefox version",
            "last 1 safari version"
        ]
    }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

your filename is incorrect. for css modules you don't need to add .module to the filename, just name it LoginPage.css and import it with that same name and your styles should be fine. React is getting confused with your module filename.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda