Ionic 4 trying to do a production build on the starting template (ie myApp -> tab app with ‘World your oyster’). I update my script in package.json to allow for production outputs (“build”: “ng build --prod”). I run ‘ionic build’. Everything renders as expected. But when I go to the www folder and open index.html I get the following error in the console:
[Error] Not allowed to load local resource: file:///runtime.js
[Error] Not allowed to load local resource: file:///polyfills.js
[Error] Not allowed to load local resource: file:///styles.js
[Error] Not allowed to load local resource: file:///vendor.js
[Error] Not allowed to load local resource: file:///main.js
In Ionic 3 I usually deploy the files in www folder to my webserver to run as PWA. I expect opening the index.html file in www should run the PWA as per Ionic 3.
I haven’t changed anything in the myApp template. Also checked permissions in the folder R&W is applied for all the files. Anyone else got this working?
PS I am using a macOS High Sierra 10.13.6