Project Structure Ionic: src files copied to www?

Hi guys,
i’m trying some app examples on Ionic while i’m reading the documentation.
Here is said that with ionic serve the raw code in src in transpiled into the ES5 version of JavaScript.
My questions are the following:
-when i run ionic server all the code in src is copied in the www folder (also assets, css files etc)?
-testing the app on a device, like android platform, does the same thing of copying to www folder or it does something different like copying the files inside the folder platforms?

Thank you :slight_smile:

Pretty much all non-code files should be in assets as this is copied over.

More or less: The finished content of www is copies over to the platform_www folder inside the generated platform project.

so, I’m wondering if I can manually copy over files to www on my web server and the ionic web app will work? what else will I need? manifest.json, package.json? I’m trying to copy over something that works on Stackblitz but unclear on what’s required to get ionic to run off a web server


Your server configuration needs to be correct though (rewrite all urls to index.html)

Hope you don’t mind continuing this discussion - I have Ionic v1 apps running on GitHub gh-pages but now want to do the same with v3 or v4. I get index.html to work but am not sure where the Ionic and angular scripts get invoked/loaded when the index.html is served to the browser

Dont really get your question
When you publish all of your www folder to the remote folder, the browser will get it from there, right? All the assets like html js css etx

I dont use github to publish apps, only firebase, so cant tell

Ok. Maybe I’m missing the assets folder. I’ll try again.

I’ll do some more digging - maybe just start using the CLI. I’m wondering how the browser knows to get the Ionic bundle from the CDN. It would then be able to interpret the custom Ionic htnl tags (I’m assuming these are web components?).

In index.html there is a script tag loading it

Or any other html file