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

276
Vistas
Split webpack in a sync way to use this conf in eslint

I want to use the module path feature in webpack because the code is very clean with this feature.

My current project is an expo app with typescript so i found in the expo doc how to implement the module path feature. Basically, it's that

const createExpoWebpackConfigAsync = require("@expo/webpack-config");
const path = require("path");

module.exports = async function (env, argv) {
    const config = await createExpoWebpackConfigAsync(env, argv);

    config.resolve.modules = [path.resolve("./src"), "node_modules"];

  return config;
};

That returns a promise.

On the other hand, I would like to use eslint to have extra help while i'm coding, and that is the problem i don't know how to configure eslint with the module path feature. The package eslint-plugin-import allow use the webpack cnf for eslint but the webpack conf has to be sync and the expo project use an async configuration. So the only way is to split the configuration in a sync webpack config to handle the alias and use that for eslint, but i don't have any idea how to do it.

In my package.json , in the eslintConfig property i added

"settings": {
    "import/resolver": {
        "webpack": "./webpack.config.js"
    }
}
about 4 years ago · Juan Pablo Isaza
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