Skip to content

Commit

Permalink
refactor(webpack): better es5 check for default
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickJS authored Sep 9, 2016
1 parent 4b5b94b commit a0f57b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module.exports = {
loader: 'string-replace-loader',
query: {
search: '(System|SystemJS)(.*[\\n\\r]\\s*\\.|\\.)import\\((.+)\\)',
replace: '$1.import($3).then(mod => mod.__esModule ? (mod.default || mod) : mod)',
replace: '$1.import($3).then(mod => (mod.__esModule && mod.default) ? mod.default : mod)',
flags: 'g'
},
include: [helpers.root('src')]
Expand Down

0 comments on commit a0f57b4

Please sign in to comment.