ソースを参照

Don't wrap the build in an anonymous `define`.

This cause the error "Mismatched anonymous define" when loading the
bundle in Plone.

The original reason for adding `start.frag` was to wrap the bundle in a
closure to not pollute the global namespace (e.g. overriding global
`define` and `require` with Almond`s versions) and secondarily to allow
people to load the bundle via require.js.

The second usecase should now probably be done via a shim in the
require.js config.
JC Brand 7 年 前
コミット
6f5491e9bd
1 ファイル変更1 行追加10 行削除
  1. 1 10
      src/start.frag

+ 1 - 10
src/start.frag

@@ -7,16 +7,7 @@
 
 /* jshint ignore:start */
 (function (root, factory) {
-    if (typeof define === 'function' && define.amd) {
-        //Allow using this built library as an AMD module
-        //in another project. That other project will only
-        //see this AMD call, not the internal modules in
-        //the closure below.
-        define([], factory);
-    } else {
-        //Browser globals case.
-        root.converse = factory();
-    }
+    root.converse = factory();
 }(this, function () {
     //almond, and your modules will be inlined here
 /* jshint ignore:end */