Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

312
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda