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

196
Visualizações
How to bundle a plugin based javascript platform

I'am trying to achieve a plugin system for my typescript SPA, but I'am not sure how to approach this in terms of code bundling/splitting.

Current setup

The frontend and backend is implemented with Typescript / ESM.

Frontend:

  • Vuejs 3
  • Vitejs/Rollup
  • Pinia

Backend/API:

  • NestJs with Express/RestAPI

The app currently consist of 3 npm packages:

  • Server: NestJs Server Application
  • Web: Vuejs Frontend / UI Components
  • Common: Shared models and interfaces and utilities between frontend and backend

Requirements

I want to enable third parties to implement additional modules for this platform installable e.g. via NPM or ideally by just copying the module into a modules directory or some kind of marketplace in the future.

A third party module should be able to import and use classes from the core frontend/backend and common packages similar to the core modules itself. For example, a third party module should be able to access services/models/ui-components and stores of a core calendar module.

Ideally this should work without the need to rebuild the whole frontend/backend. I'am coming from languages like Java and PHP in which you have namespaces, packages and classloaders. I'am not sure how to bundle something like this in a javascript application especially for the frontend.

So my questions are:

  • How to bundle/split the core packages
  • How to import core packages within third party modules
  • How to build, bundle/split the third party packages

I assume I have to somehow add those core dependencies as externals within the third party module and provide the core bundles as UMD or ESM.

Would be great if someone could point me in the right direction and can provide me with some hints, resources, best practices or even existing/similar solutions.

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