Browse Source

Workaround issue with r.js that cannot bundle typescriptServices

Alex Dima 8 years ago
parent
commit
6fecefa24b
2 changed files with 6 additions and 2 deletions
  1. 3 1
      gulpfile.js
  2. 3 1
      lib/typescriptServices.js

+ 3 - 1
gulpfile.js

@@ -106,7 +106,9 @@ gulp.task('import-typescript', function() {
 	tsServices +=
 `
 // MONACOCHANGE
-define([], function() { return ts; });
+// Defining the entire module name because r.js has an issue and cannot bundle this file
+// correctly with an anonymous define call
+define("vs/language/typescript/lib/typescriptServices", [], function() { return ts; });
 // END MONACOCHANGE
 `;
 	fs.writeFileSync(path.join(TYPESCRIPT_LIB_DESTINATION, 'typescriptServices.js'), tsServices);

+ 3 - 1
lib/typescriptServices.js

@@ -81536,5 +81536,7 @@ var TypeScript;
 var toolsVersion = "2.1";
 
 // MONACOCHANGE
-define([], function() { return ts; });
+// Defining the entire module name because r.js has an issue and cannot bundle this file
+// correctly with an anonymous define call
+define("vs/language/typescript/lib/typescriptServices", [], function() { return ts; });
 // END MONACOCHANGE