Skip to content
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

public folder is always empty #1771

Closed
iBasit opened this issue Aug 20, 2016 · 8 comments
Closed

public folder is always empty #1771

iBasit opened this issue Aug 20, 2016 · 8 comments

Comments

@iBasit
Copy link

iBasit commented Aug 20, 2016

I have latest angular-cil@webpack release.

each time I ng build with dev or prod mode, the public folder is always empty and dist folder is created.

everything works fine in dist folder, but then what is the purpose of public folder?

also If I wanted to change the location of dist folder to some other folder, how can I do that?

@deebloo
Copy link
Contributor

deebloo commented Aug 22, 2016

@iBasit the public folder is to put static assets in. (Images, css, etc). It is then copied over to the dist folder. In master currently this has been deprecated and instead there is an "assets" directory under the src dir

@filipesilva
Copy link
Contributor

@deebloo explained it very well. #1633 also allows you to define the outDir.

@iBasit
Copy link
Author

iBasit commented Aug 23, 2016

outDir does not really work, I have tried changing it, but result is always same. So I just created gulp script to move to another place, once its in dist.

@filipesilva
Copy link
Contributor

That PR is not part of a release yet, mind you. On the next release it should work.

@mafo5
Copy link

mafo5 commented Sep 1, 2016

@deebloo in webpack.8 the copy of assets like an img folder from the public folder is not working with ng build --prod. How do I get my static assets into my dist folder?

Even the src/assets directory isn't working that way

@deebloo
Copy link
Contributor

deebloo commented Sep 1, 2016

@mafo5 the public folder has been changed to be under src/assets. you can configure that in the angular-cli.json at apps[0].assets

@mafo5
Copy link

mafo5 commented Sep 2, 2016

@deebloo awesome answer -.-
First of all I wrote that I tried the src/assets folder without any success.
Second I also tried public and extend the apps[0].assets configuration entry by my img entry. Nothing works so far.
Third sorry for my mean answer by I really getting frustrated by the lack of documentation but just deactivating code (I just beleave you) and remove readme entries without any replacement.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants