Skip to content

Commit

Permalink
fix: workaround babel's 5.6 Don't hotlink internal Babel files. war…
Browse files Browse the repository at this point in the history
…ning
  • Loading branch information
thgreasi committed Jul 14, 2015
1 parent 3c7cb51 commit 224e963
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ module.exports = function (babel) {

var path = require('path');

var UmdFormatter = require('./../babel-core/lib/babel/transformation/modules/umd');

function getImportPath(file, relativeImportPath) {
var filename = file.opts.filename;
var filePath = filename.replace(/[^\/]+$/, '');
Expand All @@ -19,6 +17,7 @@ module.exports = function (babel) {
var importedModuleFile = t.cloneDeep(file);
importedModuleFile.opts = t.cloneDeep(file.opts);
importedModuleFile.opts.filename = importedModuleFile.opts.filenameRelative = importedModulePath + '.js';
var UmdFormatter = file.moduleFormatter.constructor;
var result = new UmdFormatter(importedModuleFile).getModuleName();
return result;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "babel-plugin-system-import-transformer",
"version": "1.1.1",
"version": "1.1.2",
"description": "Babel plugin that replaces System.import with the equivalent UMD pattern",
"main": "index.js",
"author": "Thodoris Greasidis",
Expand Down

0 comments on commit 224e963

Please sign in to comment.