Useful snippets

    npm link library

    Start

    tror det er viktig å uninstalle @scope/library først?

    See if npm link works

    Run npm run build in the library. See if it updates the app.

    If stuff doesn't update in app, try

    npm install --cache /tmp/empty-cache

    Then restart app dev server

    Maybe try this on the app side

    Maybe also try this on the library side

    I don't think it's necessary to uninstall library from node modules.

    If app cant find css

    attempting to import css from app (like with bootstrap css) does not always work for some reason

    inject css into js so that the package imports css by itself

    Reference

    When npm link works, npm ls @scope/package should return:

    app@0.1.0 /home/user/code/app
    └── @scope/package@0.1.0 extraneous -> ./../packages/package-components-project
    

    Useful information about npm link and cleaning up and stuff, see README!: https://github.com/jasonsturges/vite-typescript-npm-package