Skip to content

Commit

Permalink
fix: rollup outputs non .css files in the correct order
Browse files Browse the repository at this point in the history
Depends on new `processor.has()` API
  • Loading branch information
tivac committed Jan 9, 2019
1 parent df5ac6f commit 2b8fec6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/rollup/rollup.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,15 @@ module.exports = (opts) => {
let counter = 1;

// Get CSS files being used by this chunk
const styles = Object.keys(modules).filter(filter);
const styles = Object.keys(modules).filter((file) => processor.has(file));

// Get dependency chains for each css file & record them into the usage graph
styles.forEach((style) => {
processor
.dependencies(style)
.forEach((file) => css.add(file));

css.add(style);

processor.dependencies(style).forEach((file) => css.add(file));
});

// Want to use source chunk name when code-splitting, otherwise match bundle name
Expand Down

0 comments on commit 2b8fec6

Please sign in to comment.