Skip to content

Commit

Permalink
fix: fix mini-css-extract-plugin missing default export error (#1748)
Browse files Browse the repository at this point in the history
Default exports should only be used for CSS modules.
  • Loading branch information
thecrypticace committed Oct 27, 2020
1 parent afe8a0d commit 429a284
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/loaders/pitcher.js
Expand Up @@ -120,7 +120,9 @@ module.exports.pitch = function (remainingRequest) {
...beforeLoaders
])
// console.log(request)
return `import mod from ${request}; export default mod; export * from ${request}`
return query.module
? `export { default } from ${request}; export * from ${request}`
: `export * from ${request}`
}
}

Expand Down

0 comments on commit 429a284

Please sign in to comment.