mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
This property isn't properly documented (https://github.com/systemjs/systemjs/blob/master/docs/config-api.md#meta), but the implementation can be found here: *96f9ec1edf/src/fetch.js (L26)*96f9ec1edf/src/fetch.js (L83)
65 lines
997 B
TypeScript
65 lines
997 B
TypeScript
import SystemJS = require('systemjs');
|
|
|
|
SystemJS.config({
|
|
baseURL: '/app'
|
|
});
|
|
|
|
SystemJS.import('main.js');
|
|
|
|
SystemJS.config({
|
|
// or 'traceur' or 'typescript'
|
|
transpiler: 'babel',
|
|
// or traceurOptions or typescriptOptions
|
|
babelOptions: {
|
|
|
|
}
|
|
});
|
|
|
|
|
|
SystemJS.config({
|
|
map: {
|
|
traceur: 'path/to/traceur.js'
|
|
}
|
|
});
|
|
|
|
SystemJS.config({
|
|
meta: {
|
|
'*': {
|
|
authorization: true
|
|
}
|
|
}
|
|
});
|
|
|
|
SystemJS.config({
|
|
meta: {
|
|
'*': {
|
|
authorization: 'Basic YWxhZGRpbjpvcGVuc2VzYW1l'
|
|
}
|
|
}
|
|
});
|
|
|
|
SystemJS.config({
|
|
map: {
|
|
'local/package': {
|
|
x: 'vendor/x.js'
|
|
},
|
|
'another/package': {
|
|
x: 'vendor/y.js'
|
|
}
|
|
}
|
|
});
|
|
|
|
SystemJS.transpiler = 'traceur';
|
|
|
|
|
|
// loads './app.js' from the current directory
|
|
SystemJS.import('./app.js').then(function (m) {
|
|
console.log(m);
|
|
});
|
|
|
|
SystemJS.import('lodash').then(function (_) {
|
|
console.log(_);
|
|
});
|
|
|
|
const clonedSystemJSJS = new SystemJS.constructor();
|