[ 
https://issues.apache.org/jira/browse/TAP5-2350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14030385#comment-14030385
 ] 

Jochen Kemnade commented on TAP5-2350:
--------------------------------------

First findings with a real application:
- need a way to define the variable names for the module function (like in 
{{new JavaScriptModuleConfiguration(library).dependsOn('jquery').as('$')}})
- need a way to disable the AMD wrapping for certain libraries (e.g. if they 
use {{eval}} and depend on the "root" variable not being renamed, that can 
break when minifying them)

On a side note, I wished there was an interface underneath 
{{JavaScriptModuleConfiguration}} and {{ModuleManager}} used that interface for 
its configuration. It's quite hard to override the current behavior because 
{{JavaScriptModuleConfiguration}} is a class, and even a final one.

> JavaScript library with module shim config is loaded twice if module is added 
> to a stack
> ----------------------------------------------------------------------------------------
>
>                 Key: TAP5-2350
>                 URL: https://issues.apache.org/jira/browse/TAP5-2350
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: Jochen Kemnade
>              Labels: javascript, stack
>
> When a shim config is defined for a JavaScript library and the resulting 
> "module" is added to a JavaScript stack, the raw library will be added to the 
> stack resource (without a define statement). But under normal circumstances, 
> it will never be used as it is added without any module wrapper code.
> When the library is required (via the shim module) from another module, 
> requirejs loads it again.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to