Skip to content

Commit

Permalink
feat(sass-loader): support outer deps
Browse files Browse the repository at this point in the history
re #8
  • Loading branch information
Genuifx committed Jul 9, 2019
1 parent 19dfb0d commit 7d3e966
Show file tree
Hide file tree
Showing 3 changed files with 2,523 additions and 2,600 deletions.
8 changes: 7 additions & 1 deletion packages/wxa-compiler-sass/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ class SassCompiler {
if(this.configs == null) this.configs = configs || {};
}

async parse(mdl, cmdConfigs) {
async parse(mdl, cmdConfigs, compilation) {
debug('sass module parse started %O', mdl);

let configs = this.configs;

let ret = await this.render(mdl.content || null, mdl.meta.source, configs);

mdl.code = ret.css.toString();
if (ret.stats.includedFiles.length) {
ret.stats.includedFiles.forEach((file)=>{
mdl.dependency(file, compilation);
});
}
// console.log(ret.stats.includedFiles)

// custom outputPath
if(mdl.meta) {
Expand Down
Loading

0 comments on commit 7d3e966

Please sign in to comment.