GithubHelp home page GithubHelp logo

subapp-research's Introduction

subapp-research

Re-exploring how to implement subapp for a micro-frontend design.

Intro

Some basic re-considerations and requirements:

  1. A single source of truth where subapps are declared.
  2. A single webpack pass to process and build subapps. No longer need a separate step to discover them to pass the info to webpack.
  3. Default typescript as primarily implementation language.
  4. Easy and simple to develop subapps independently and publish them as modules.
  5. Explicit APIs for declaring and adding features to subapps.

Technical solutions explored to solve some of the things above:

  1. Use dynamic import to create subapp bundles.
  2. Use a webpack plugin to statically analyze source AST to find out subapps declarations.
  3. TypeScript as default language
  4. Implement additional features as separate modules with APIs that the subapp can call to add features to itself.

Working on this

Packages are kept locally for experimentation and they are not publish.

To handle the npm workflow locally, fyn must be used.

Bootstrap packages

npx fynpo

Or bootstrap a specific package: npx fynpo bootstrap --only subapp-plugin, which will ensure all local dependencies are also bootstrapped.

Testing the app

After packages are bootstrapped, go into app and run:

cd app
fyn
npx webpack-dev-server

Then load https://localhost:8080/static

To build with webpack: npx webpack

subapp-research's People

Contributors

jchip avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.