Permalink
Browse files

fix: remove unnecessary inline SystemJS text plugin

Both cli+bundler+systemjs and skeleton-navigation (jspm skeletons) bundle npm package systemjs-plugin-text. The previous inline text plugin in loader-default is unnecessary, and it prevents aurelia-i18n-loader from working properly with SystemJS.

closes aurelia/i18n#289
  • Loading branch information...
huochunpeng committed Nov 14, 2018
1 parent 6bb8248 commit 8c9a183653a88b60aa1a8cbe21f602a0d262357e
Showing with 0 additions and 15 deletions.
  1. +0 −15 src/index.js
@@ -208,21 +208,6 @@ if (!PLATFORM.global.System || !PLATFORM.global.System.import) {
}
};
System.set('text', System.newModule({
'translate': function(load) {
return 'module.exports = "' + load.source
.replace(/(["\\])/g, '\\$1')
.replace(/[\f]/g, '\\f')
.replace(/[\b]/g, '\\b')
.replace(/[\n]/g, '\\n')
.replace(/[\t]/g, '\\t')
.replace(/[\r]/g, '\\r')
.replace(/[\u2028]/g, '\\u2028')
.replace(/[\u2029]/g, '\\u2029')
+ '";';
}
}));
DefaultLoader.prototype._import = function(moduleId) {
return System.import(moduleId);
};

0 comments on commit 8c9a183

Please sign in to comment.