Skip to content

Commit

Permalink
cache @import supports prelude
Browse files Browse the repository at this point in the history
  • Loading branch information
Bart Veneman committed Oct 15, 2023
1 parent 1fef8bb commit 2020c29
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,11 @@ export function analyze(css, options = {}) {
if (atRuleName === 'import') {
walk(node, function (prelude_node) {
if (prelude_node.type === 'Condition' && prelude_node.kind === 'supports') {
supports.push(stringifyNode(prelude_node), prelude_node.loc)
let prelude = stringifyNode(prelude_node)
supports.push(prelude, prelude_node.loc)

if (isSupportsBrowserhack(prelude_node)) {
supportsBrowserhacks.push(stringifyNode(prelude_node), prelude_node.loc)
supportsBrowserhacks.push(prelude, prelude_node.loc)
}
return this.break
}
Expand Down

0 comments on commit 2020c29

Please sign in to comment.