[gatein-issues] [JBoss JIRA] (GTNPORTAL-3454) Remove native AMD modules from requireJs config
Peter Palaga (JIRA)
issues at jboss.org
Wed Apr 23 08:11:33 EDT 2014
Peter Palaga created GTNPORTAL-3454:
---------------------------------------
Summary: Remove native AMD modules from requireJs config
Key: GTNPORTAL-3454
URL: https://issues.jboss.org/browse/GTNPORTAL-3454
Project: GateIn Portal
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: Peter Palaga
Assignee: Peter Palaga
RequireJs config is a json structure renderead inline in the HTML markup of every page returned by the portal. The recent "Native AMD Support" feature has brought the possibility to work with large third-party javascript frameworks such as Dojo containing thousands of JavaScript modules. The present implementation adds an entry for every native AMD module into RequireJs config. With a dojo portlet deployed, this causes an overhead of more than 400KB per page.
Steps to Reproduce:
1. Compile and deploy the dojo portlet application from https://github.com/ppalaga/dojo-portlet
2. Import applications
3. Inspect the source of any portal page, e.g. /portal/classic/home
4. Locate the line starting with
var require =
Actual results: All dojo resources are there in the json structure assigned to the require variable.
Expected results: No resources coming from Dojo should be there.
Additional info: Not having the resources coming from Dojo in requireJS config is technically possible as the native AMD modules are implicitly SHARED and the baseUrl is set properly in the config.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the gatein-issues
mailing list