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

309
Vistas
How do I build an NPM package that can access a [my package]-conf.js file in the root of the main project
// this is for a Vue 3 project - not sure if that's important for the answer

// APPENDIX: 
//   package = npm package
//   project = vue 3 project that will import the npm package

I'm building an npm package that has reusable vue components using vue-sfc-rollup.

To allow for customisation I want to give the user the ability to make a config file in the root (same level as the package.json of the project) which can then be accessed by the package.

I was hoping it would look something like this.

import config from '@/my-package-conf.js' where @ (or other symbol) would indicate the root of the project

I assume this can be done using a relative path but that won't be particularly easy for my implementation.

Thanks for any help you can provide!

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