franzliedke / studio

A workbench for developing Composer packages.
MIT License
1.14k stars 73 forks source link

Packages Using Relative Paths May Sometimes Break (Symlink Issue) #88

Open zschuessler opened 6 years ago

zschuessler commented 6 years ago

Hi,

First thanks for this great package. I love it!

I'm using Laravel Mix to merge a package manifest file into the main application's manifest file. The way I'm achieving this is by setting the public path with a relative path:

mix.setPublicPath('./../../../../../public').mergeManifest();

This doesn't work because of the symlink. If I were to give an absolute path or remove the symlink (and treat the package as a real composer package) it works.

Any ideas on how I could use relative paths with the symlink in play? (Sorry in advance if this is an issue with my own ignorance instead of an issue with your package)

Thanks! Cheers.

Edit: Digging up more info to come up with a solution. I noticed the symlink is on the package name, not the package namespace. So there's what the structure looks like for the vendor folder:

- vendor
--- packagenamespace (folder)
------- packagename (symlink) --> ../../../my-custom-path/packagenamespace/packagename/

Here's my studio.json file in case it's relevant:

{
    "version": 2,
    "paths": [
        "/var/www/composer-local/*"
    ]
}