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

375
Vistas
Exclude everything in the build except one folder Serverless Patterns

I am working on a serverless project. what I want to achieve or want to know if it is possible or not is that when I run sls package i want the serverless to exclude every file/folder in the root directory except for one folder.

I have tried multiple ways to do it using patterns in serverless file but nothing worked.

package: #This didn't not work
  patterns:
    - '!./**'
    - './dist/**'


package: # This didn't work
  patterns:
    - '!.*/**'
    - './dist/**'

Am I missing something? Because I was able to exclude particular folders if I define them explicitly. But I was unable to exclude the entire root directory using wild card characters.

package: # This works and excludes constant folder
  patterns:
    - '!./constants/**'

I know I can achieve it by making a script. But I want to know if it can be done via the serverless framework by simply defining the patterns.

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