[SOLVED] Ionic CLI v4, where are the source-maps?

I ran

ionic serve --source-map

but I didn’t find any source-maps, anyone know where they are or what I did wrong in my cmd (I ran i according the doc: https://beta.ionicframework.com/docs/cli/serve)

1 Like

ok so if I understand, with the new cli when I run ionic serve the files aren’t generated anymore under www folder but somewhere else …but where then? anyone?

Well I didn’t solve my question but my original question yes


 npm run build --source-map

will generate js and map files under www folder


 ionic build --source-map
1 Like

@reedrichards That is a nice discussion you are having with yourself!

Just out of interest why would you want a source map - it just makes the code easier to read - when many often want to secure or hide their code.

1 Like

to use tools like source-map-explorer aka to verify that you only bundle what you need and nothing more respectively no exotic library or all library I would not like (like including all moment locales when my app only use a couple), you need the source map

and right now, to be more specific, I want to have a look at the map to see how my modal code is packaged in the output bundles

UPDATE hahaha exactly what happened, just noticed that all moment locales are included in my bundle :joy: