11var fetchText , _buildMap = { } ;
22
3+ //>>excludeStart('excludeBabel', pragmas.excludeBabel)
34if ( typeof window !== "undefined" && window . navigator && window . document ) {
45 fetchText = function ( url , callback ) {
56 var xhr = new XMLHttpRequest ( ) ;
@@ -22,10 +23,20 @@ if (typeof window !== "undefined" && window.navigator && window.document) {
2223 callback ( fs . readFileSync ( path , 'utf8' ) ) ;
2324 } ;
2425}
26+ //>>excludeEnd('excludeBabel')
2527
26- define ( [ 'babel' ] , function ( babel ) {
28+ define ( [
29+ //>>excludeStart('excludeBabel', pragmas.excludeBabel)
30+ 'babel'
31+ //>>excludeEnd('excludeBabel')
32+ ] , function (
33+ //>>excludeStart('excludeBabel', pragmas.excludeBabel)
34+ babel
35+ //>>excludeEnd('excludeBabel')
36+ ) {
2737 return {
2838 load : function ( name , req , onload , config ) {
39+ //>>excludeStart('excludeBabel', pragmas.excludeBabel)
2940 var url = req . toUrl ( name + '.js' ) ;
3041
3142 fetchText ( url , function ( text ) {
@@ -41,11 +52,11 @@ define(['babel'], function(babel) {
4152
4253 onload . fromText ( code ) ;
4354 } ) ;
55+ //>>excludeEnd('excludeBabel')
4456 } ,
4557
4658 write : function ( pluginName , moduleName , write ) {
4759 if ( moduleName in _buildMap ) {
48- // var text = jsEscape(buildMap[moduleName]);
4960 write . asModule ( pluginName + '!' + moduleName , _buildMap [ moduleName ] ) ;
5061 }
5162 }
0 commit comments