Skip to content

Commit

Permalink
Merge pull request #14 from kadirahq/make-loaders-work-as-expected
Browse files Browse the repository at this point in the history
Pass the returned value to module caller
  • Loading branch information
arunoda authored Sep 22, 2016
2 parents d518b91 + 2fc3110 commit f152796
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ const loaders = require(path.resolve(loadersPath));

Object.keys(loaders).forEach(ext => {
const loader = loaders[ext];
require.extensions[`.${ext}`] = (m, filepath) => loader(filepath);
require.extensions[`.${ext}`] = (m, filepath) => {
m.exports = loader(filepath);
};
})

// load polyfills
Expand Down

0 comments on commit f152796

Please sign in to comment.