mirror of
https://github.com/systemjs/systemjs.git
synced 2026-01-18 14:53:14 +00:00
13 lines
366 B
JavaScript
13 lines
366 B
JavaScript
/*
|
|
Text plugin
|
|
*/
|
|
exports.translate = function(load) {
|
|
if (this.builder && this.transpiler) {
|
|
load.metadata.format = 'esm';
|
|
return 'exp' + 'ort var __useDefault = true; exp' + 'ort default ' + JSON.stringify(load.source) + ';';
|
|
}
|
|
|
|
load.metadata.format = 'amd';
|
|
return 'def' + 'ine(function() {\nreturn ' + JSON.stringify(load.source) + ';\n});';
|
|
}
|