Skip to content

Commit

Permalink
Merge pull request #75 from Ti-webdev/master
Browse files Browse the repository at this point in the history
handle processed.dependencies
  • Loading branch information
Rich-Harris authored Feb 19, 2019
2 parents e41804b + 265e6a7 commit a603db6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ module.exports = function(source, map) {
options.preprocess.filename = options.filename;

preprocess(source, options.preprocess).then(processed => {
if (processed.dependencies && this.addDependency) {
for (let dependency of processed.dependencies) {
this.addDependency(dependency);
}
}

let { js, css } = normalize(compile(processed.toString(), options));

if (options.hotReload && !isProduction && !isServer) {
Expand Down

0 comments on commit a603db6

Please sign in to comment.