Skip to content

Commit

Permalink
Resolve partials properly
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelthomas2774 committed Mar 17, 2019
1 parent d4ed8ad commit 9a7ec57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ class Comms {
const sassImporter = async (context, url, prev, inlinedFiles) => {
let file = path.resolve(path.dirname(prev), url);

const scss = await FileUtils.readFile(file).catch(err => FileUtils.readFile(file += '.scss'));
const scss = await FileUtils.readFile(file)
.catch(err => FileUtils.readFile(file += '.scss'))
.catch(err => FileUtils.readFile(file = path.join(path.dirname(file), '_' + path.basename(file).substr(0, path.basename(file).length - 5))))
.catch(err => FileUtils.readFile(file += '.scss'));

const result = await postcss([postcssUrl({url: 'inline', encodeType: 'base64', optimizeSvgEncode: true})])
.process(scss, {from: file, syntax: postcssScss});
Expand Down
File renamed without changes.

0 comments on commit 9a7ec57

Please sign in to comment.