Skip to content
This repository was archived by the owner on Dec 5, 2019. It is now read-only.

Commit 92633b2

Browse files
brigandmichael-ciniawsky
authored andcommitted
feat: uses the default export if available (#19)
1 parent 34aa04b commit 92633b2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports.pitch = function(remainingRequest) {
1414
' if(!component) {',
1515
' require.ensure([], function() {',
1616
' component = require(' + loaderUtils.stringifyRequest(this, moduleRequest) + ');',
17+
' if (component && component.default) component = component.default;',
1718
' if(callback) callback(component);',
1819
' }' + (query.name ? ', ' + JSON.stringify(query.name) : '') + ');',
1920
' } else if(callback) callback(component);',

0 commit comments

Comments
 (0)