dianjuar / how-to-import

Experiment on how we should be importing our libraries to have a smaller bundle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to Import

yalc a library

  1. build the library:
    • npx nx build LIB_NAME
  2. step on dist:
    • cd dist/libs/LIB_NAME
  3. yalc it
    • npx yalc publish
  4. step on the root project:
    • cd ../../..
  5. "install it":
    • npx yalc add @fake-npm/LIB_NAME
A custom executor would be veeeery nice

Possible lib names:

  • common-js-lib

Analyze an App

yarn analyze APP_NAME

Possible apps names:

  • directly-app
  • commonjs-app

About

Experiment on how we should be importing our libraries to have a smaller bundle


Languages

Language:TypeScript 100.0%Language:CSS 0.0%Language:JavaScript 0.0%Language:HTML 0.0%Language:Shell 0.0%