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 authored 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
Original file line number Diff line number Diff line change
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 # to comment.