Closed
Bug 962969
Opened 10 years ago
Closed 10 years ago
[email] build: make_gaia_shared.js should use source dir for shared dependency scanning
Categories
(Firefox OS Graveyard :: Gaia::E-Mail, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.3 C3/1.4 S3(31jan)
People
(Reporter: jrburke, Assigned: jrburke)
Details
(Whiteboard: [p=1])
Attachments
(1 file)
Now that email is using uglifyjs for minification, the make_shared_gaia.js script that looks for shared resources to include in the app dir, for dynamic loading, it will not find some constructs now inside a define()'d module, like: require(['a'], function() {}) because uglify mangles the file so the AST walking does not find the module API calls. It is better to use the source files for this walking, and it is also OK to use the source files for the digest creation as all changes are keyed off source file changes anyway.
Assignee | ||
Comment 1•10 years ago
|
||
Uses srcDir instead of buildDir, and makes sure a shared resource is only added once to the shared.js array. Context for reviewer: psingapati in irc found that doing a dynamic require call with uglify on for a shared resource no longer worked. It was because of the uglification mangling the AST such that the AST dependency scanning could not find the expected AMD API names.
Attachment #8364187 -
Flags: review?(bugmail)
Updated•10 years ago
|
Attachment #8364187 -
Flags: review?(bugmail) → review+
Assignee | ||
Comment 2•10 years ago
|
||
Merged in gaia master: https://github.com/mozilla-b2g/gaia/commit/b121168d733cbaac875d69612b3a47b35beaa30d from pull request: https://github.com/mozilla-b2g/gaia/pull/15635 Does not affect 1.3, just a master, as only master has uglify minification enabled.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•10 years ago
|
Whiteboard: [p=1]
You need to log in
before you can comment on or make changes to this bug.
Description
•