custom system.js loader

- disables ‘moduleId’ usage when building with webpack
This commit is contained in:
Denys Vuika
2016-12-08 15:49:19 +00:00
parent 067def255e
commit dd20f6fc78
3 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
const moduleIdRegex = /moduleId: module.id,/g;
module.exports = function(source) {
this.cacheable();
let result = source;
let modified = false;
if (moduleIdRegex.test(source)) {
result = source.replace(moduleIdRegex, (match) => {
return `// ${match}`;
});
// console.log(result);
}
return result;
}