DEV Community

Discussion on: Building a Webpack alternative in F#

 
tunaxor profile image
Angel Daniel Munoz Gonzalez • Edited

Library mode is something that I have an issue open about, it might be worth considering but since the dependencies you make with Perla are from a CDN I'm not sure if it makes sense for libraries in the long run I think npm is better there (at leas for now) but would be great if you give feedback about your use case in the Perla repo

If you have something like a mono repo e.g

root
  | src (or packages)
    | perla project
      | src
      perla.jsonc
    | common
      | src
         some.js
Enter fullscreen mode Exit fullscreen mode

check out the mounted directories option in perla.jsonc you could mount that extra directory into a particular route and try to import things from there the setting would be

{ // ... other options
 "devServer": {
    // ... other options
    // mount local directories on specific URL paths
    "mountDirectories": {
      "./src": "/src",
      "./assets": "/assets",
      "../common/src": "/common"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

and your code would import it like
import {some} from '/common/some.js