Ionic Web App production build


#1

Hello everyone,

I used ionic without cordova and I know ionic supports only two configurations, dev and prod. If we want build for prod we need to use --prod but I need also use uglify.js with unique name of script: main.js
but I always get main.js and main.css
I also enabled enableProdMode in main.ts file, for pure angular-cli applications it works - we don’t need do anything else.

I tried also write some custom functions and invoke in webpack.config file but it also does not work.

Has anyone had a similar problem?


#2

What exactly do you want to do?
And what do you get that you don’t want?


#3

I want to do unique names of main.js and main.css after each production build

now I have
build/main.js in index html
I want to have:
build/main123214598259440523.js

where “123214598259440523” is unique hash.
I need it because when I publish new version of application I want the users don’t have to refresh the browser just to load the new scripts immediately.


#4

Ok, so we are talking about a PWA / web app here?


#5

Yes, we are talking about web app.


#6

Build stuff is here, but it’s not that easy to customize I think:


#7

Yes, I saw it and I tried to customize it but now I don’t know how to do it…
Thanks