Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: support module resolution in composes (#845)
  • Loading branch information
evilebottnawi committed 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
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

0 comments on commit 453248f

Please sign in to comment.