Skip to content

Commit

Permalink
fix: support module resolution in composes (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Dec 4, 2018
1 parent 8a6ea10 commit 453248f
Show file tree
Hide file tree
Showing 16 changed files with 1,329 additions and 319 deletions.
6 changes: 4 additions & 2 deletions lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,17 @@ module.exports = function loader(content, map, meta) {
const message = messages.find(
// eslint-disable-next-line no-shadow
(message) =>
message.type === 'icss-import' && message.item.index === idx
message.type === 'icss-import' &&
message.item &&
message.item.index === idx
);

if (!message) {
return placeholder;
}

const { item } = message;
const importUrl = importUrlPrefix + item.url;
const importUrl = importUrlPrefix + urlToRequest(item.url);

if (exportOnlyLocals) {
return `" + require(${stringifyRequest(
Expand Down
Loading

0 comments on commit 453248f

Please sign in to comment.