1
- //>>excludeStart('excludeBabel', pragmas.excludeBabel)
2
- var fetchText , _buildMap = { } ;
3
-
4
- if ( typeof window !== "undefined" && window . navigator && window . document ) {
5
- fetchText = function ( url , callback ) {
6
- var xhr = new XMLHttpRequest ( ) ;
7
- xhr . open ( 'GET' , url , true ) ;
8
- xhr . onreadystatechange = function ( evt ) {
9
- //Do not explicitly handle errors, those should be
10
- //visible via console output in the browser.
11
- if ( xhr . readyState === 4 ) {
12
- callback ( xhr . responseText ) ;
13
- }
14
- } ;
15
- xhr . send ( null ) ;
16
- } ;
17
- } else if ( typeof process !== "undefined" &&
18
- process . versions &&
19
- ! ! process . versions . node ) {
20
- //Using special require.nodeRequire, something added by r.js.
21
- fs = require . nodeRequire ( 'fs' ) ;
22
- fetchText = function ( path , callback ) {
23
- callback ( fs . readFileSync ( path , 'utf8' ) ) ;
24
- } ;
25
- }
26
- //>>excludeEnd('excludeBabel')
27
-
28
1
define ( [
29
2
//>>excludeStart('excludeBabel', pragmas.excludeBabel)
30
3
'babel' , 'babel-plugin-module-resolver' ,
@@ -37,6 +10,31 @@ define([
37
10
//>>excludeEnd('excludeBabel')
38
11
) {
39
12
//>>excludeStart('excludeBabel', pragmas.excludeBabel)
13
+ var fetchText , _buildMap = { } ;
14
+
15
+ if ( typeof window !== 'undefined' && window . navigator && window . document ) {
16
+ fetchText = function ( url , callback ) {
17
+ var xhr = new XMLHttpRequest ( ) ;
18
+ xhr . open ( 'GET' , url , true ) ;
19
+ xhr . onreadystatechange = function ( evt ) {
20
+ //Do not explicitly handle errors, those should be
21
+ //visible via console output in the browser.
22
+ if ( xhr . readyState === 4 ) {
23
+ callback ( xhr . responseText ) ;
24
+ }
25
+ } ;
26
+ xhr . send ( null ) ;
27
+ } ;
28
+ } else if ( typeof process !== 'undefined' &&
29
+ process . versions &&
30
+ ! ! process . versions . node ) {
31
+ //Using special require.nodeRequire, something added by r.js.
32
+ var fs = require . nodeRequire ( 'fs' ) ;
33
+ fetchText = function ( path , callback ) {
34
+ callback ( fs . readFileSync ( path , 'utf8' ) ) ;
35
+ } ;
36
+ }
37
+
40
38
babel . registerPlugin ( 'module-resolver' , moduleResolver ) ;
41
39
42
40
function resolvePath ( sourcePath ) {
0 commit comments