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

422
Vistas
jsconfig path alias is not working Sveltekit

I am using svelte kit (with typescript) and have some created some shortlinks and cannot get the new link "$base" to work. I added the shortlink here

./jsconfig.json

{
  "compilerOptions": {
    "module": "commonjs",
    "baseUrl": ".",
    "paths": {
      "$lib":   ["src/lib"],
      "$lib/*": ["src/lib/*"],
      "$base":  ["src/baseApp"],
      "$base/*":["src/baseApp/*"]
    }
  },
  "include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.svelte"]
}

The is also no intellisense enter image description here

More details about jsconfig.json here

I also found something about a similar issue with NEXT here

I tried this and it didn't work

In addition to jsconfig.json I tried adding my the paths to my tsconfig.json file also

{
    "extends": "./.svelte-kit/tsconfig.json",
    "compilerOptions": {
        "allowJs": true,
        "checkJs": true,
        "esModuleInterop": true,
        "forceConsistentCasingInFileNames": true,
        "resolveJsonModule": true,
        "skipLibCheck": true,
        "sourceMap": true,
        "strict": true
    },
    "paths": {
        "$lib":   ["src/lib"],
        "$lib/*": ["src/lib/*"],
        "Base":  ["src/baseApp"],
        "Base/*":["src/baseApp/*"]
      }
}

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try adding your paths to the svelte.config.js file in the root of your project

...
import path from 'path';

/** @type {import('@sveltejs/kit').Config} */
const config = {
    ...
    kit: {
        ...
        vite: {
            resolve: {
                alias: {
                    $lib: path.resolve('./src/lib'),
                    $base: path.resolve('./src/baseApp'),
                }
            }
        }
    }
};

export default config;
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