Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7529218

Browse filesBrowse files
committed
support deps registered by postcss plugins
1 parent 595d502 commit 7529218
Copy full SHA for 7529218

File tree

1 file changed

+9
-2
lines changed
Filter options

1 file changed

+9
-2
lines changed

‎lib/style-compiler/index.js

Copy file name to clipboardExpand all lines: lib/style-compiler/index.js
+9-2Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,20 @@ module.exports = function (css, map) {
5555

5656
return postcss(plugins)
5757
.process(css, options)
58-
.then(function (result) {
58+
.then(result => {
59+
if (result.messages) {
60+
result.messages.forEach(m => {
61+
if (m.type === 'dependency') {
62+
this.addDependency(m.file)
63+
}
64+
})
65+
}
5966
var map = result.map && result.map.toJSON()
6067
cb(null, result.css, map)
6168
return null // silence bluebird warning
6269
})
6370
}).catch(e => {
64-
console.log(e)
71+
console.error(e)
6572
cb(e)
6673
})
6774
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.