Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!