PDA

View Full Version : Compile to Production Issue



Yazid
1 Aug 2017, 5:52 AM
Issue
Build Web App for Production produce package not runnable when include an external js resource.
But if set for Testing, the compile web app works fine.

I was using SA 4.2.1 with CMD 6.5.0. But just upgrade to SA 4.2.2 with CMD 6.5.1 but produce the same results.

To reproduce
1. Create a blank project
2. Add a panel and button
3. Add a resource "Config.js" and set requireSdk and disable IncludeInBundle
Ext.define('MyApp.Config', {
statics: {
baseUrl:'http://example.com'
}
});
4. Build Web App for Production

Observation
The Config.js file seems to contain the entire EXTJS framework

petr.felzmann
1 Aug 2017, 10:58 PM
This functionality of SA is fully based on Cmd. You can observe the same behavior when you create and build the app without SA. I do not know if it is bug, but you can ask in Cmd forum to get more info.

petr.felzmann
2 Aug 2017, 3:00 AM
The production build does not add to your js file whole framework, but only ES6 polyfills.

Yazid
2 Aug 2017, 5:24 PM
Thanks for the info.

The Config file becomes invalid because of the polyfil. Is there a fix?

petr.felzmann
2 Aug 2017, 10:45 PM
Could you share more details, please? What does the invalid means?

Yazid
3 Aug 2017, 12:08 AM
It is going to be tough to look up at the Config.js file with all the polyfills.
56714
when my Config.js suppose to a few lines
56715

When compile set for testing the Config.js doesn't contain ES6 polyfills.
The Config.js needs to be visible and easily editable to change the configuration.

petr.felzmann
3 Aug 2017, 3:54 AM
Could you ask in Cmd forum or support portal if there is possibility to turn off inserting polyfills in production build, please?