Skip to content

ES5 fails for prod builds #1188

@arby50

Description

@arby50

A 'dev' build works when using FireFox 62 and Edge ("npm start") but a 'prod' build ("npm build") produces a blank page. In FF/Edge, the ion-nav tag is empty. The app displays in chrome. I can also duplicate this when running "npm start --prod". I can confirm via FF Dev tools that the es5 files are being produced and are loaded. I have been able to reproduce this using the bare Ionic PWA Toolkit as well as other PWA apps.

Expected behavior:
The prod build and minification process should produce ES5 compliant files that render in ES5-compliant browsers

Steps to reproduce:

using FF V63 or Edge (V42):
"npm start --prod" using the Ionic PWA toolkit:
https://github.com/ionic-team/ionic-pwa-toolkit

FYI:
Same issue occurred and was fixed a month ago:
#1132

I can get an ES2015 target to work, I just have to use the dev build with an ES5 flag set: 'npm run dev --es5'. 'dev' is defined in my package.json as "dev": "stencil build --dev --service-worker"
It only fails during production builds. Which I can work around, but I just dont get the minification (and whatever other) benefits come with a prod build.
According to stencil: Note that by default, ES5 builds and polyfills are enabled during production builds.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions