nguyenbatranvan / vite-multiple-assets

npm package
https://www.npmjs.com/package/vite-multiple-assets
MIT License
12 stars 7 forks source link

Feature: Follow Symlinks #23

Open shellscape opened 2 days ago

shellscape commented 2 days ago

If I have a plugin setup such as:

DynamicPublicDirectory([
    '/Users/code/app/assets/**'
  ],
  { ssr: false }
);

And I add a symlink to the /assets directory for test.png, that file is not available in the server and getFiles doesn't add it to the list of files available. Following symlinks would solve this, and open up a LOT of possibilities for this plugin.

shellscape commented 2 days ago

I added followSymbolicLinks on this line https://github.com/nguyenbatranvan/vite-multiple-assets/blob/cee159314911794110a3e242cae61660cdadda47/packages/libs/build.ts#L76 and it allowed me to access the file in the browser. Would be a huge improvement!