Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
fix(wxss): import wxss from root path
Browse files Browse the repository at this point in the history
  • Loading branch information
NewFuture committed May 17, 2019
1 parent c1d7feb commit 25ab1f4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/wxss-importer.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,12 @@ module.exports = function importer(url, prev, done) {
// keep import
// console.log(url);
// dart-sass not support
if (url.startsWith("file://")) {
// fixed dart-sass root file name
url = url.substr(7)
}
return { contents: '@import url("' + url.trim() + '");' };

return { contents: '@import url(' + url.trim() + ');' };
} else {
return null;
}
Expand Down
1 change: 1 addition & 0 deletions test-ts/src/app.wxss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "/x.wxss"
Empty file added test-ts/src/x.wxss
Empty file.

0 comments on commit 25ab1f4

Please sign in to comment.