New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to include assets from library #88
Comments
You can take a look at this guide on assets in the Angular CLI. It allows you to configure static assets for each "app". And you can use pathing to any folder within the "project". So you can have assets in your app/myapp dir, or you could create a lib for assets and put them in there. Then you just need to configure your Hopefully we will have an example Nx Workspace repo in the near future that will have examples of this type of setup and more. |
Is it possible to specify assets in an If I understand you correctly, at the moment, you have to duplicate the assets array for each app using the assets. |
I tried to put an
and my lib is containing assets in:
I played also with glob in my app configuration to try to integrate the |
@jogelin I tried the same without success. |
@jared-christensen try this: "apps": [ |
https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/asset-configuration.md#project-assets
|
I was able to get this working through a variation of what you guys wrote above.
Now, inside of an |
I have a library (projectType:library) that needs assets from my assets library. This auth library, doesn't have any " I tried manually creating the necessary structure, but it doesn't fix my problem, I keep getting
has anyone been able to consume an asset from an asset library into another library? |
i am also unable to share assets between libraries, it seems only libraries to applications for now |
Any recommendation on how to do this in a React Native/Expo project? |
You can share assets between libraries when you when the library consuming the asset library is type |
Thanks, I meant how does one share assets such as images (.png, .jpg, .gif, etc), videos (.mp4, .mov), audio (.mp3, .wav), etc |
How to make same thing, but with vite setup, with webpack this setup: |
@josipfrljic94 as stated in this thread , vitejs/vite#8106 , a copy plugin does not seem a bad idea.
|
I was gonna post to this thread.. having a similar issue... but decided to open a new one |
Also, related to the question from @sancelot ,According to the vite documentation in vite.config.ts in key publicDir (https://vitejs.dev/config/shared-options.html#publicdir) a link to the asset can be added, assuming that the starting point is the location of the app. |
@bombillazo please have found a solution about your question ? |
Hey @adamako, unfortunately, no. I have no straightforward way to do that without manipulating file locations during the build process. |
@bombillazo maybe there is no solution right now. Thank you |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
I don't know if this is feature request or just hope to have better guidance.
If I create e.g. widget library which should have some basic placeholder icons etc. how these assets can be added to builds?
The text was updated successfully, but these errors were encountered: