選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

sass_options.js 653 B

2年前
123456789101112131415161718192021222324
  1. let path = require("path");
  2. let { get_app_path, app_list } = require("./utils");
  3. let node_modules_path = path.resolve(get_app_path("xhiveframework"), "..", "node_modules");
  4. let app_paths = app_list.map(get_app_path).map((app_path) => path.resolve(app_path, ".."));
  5. module.exports = {
  6. includePaths: [node_modules_path, ...app_paths],
  7. quietDeps: true,
  8. importer: function (url) {
  9. if (url.startsWith("~")) {
  10. // strip ~ so that it can resolve from node_modules
  11. url = url.slice(1);
  12. }
  13. if (url.endsWith(".css")) {
  14. // strip .css from end of path
  15. url = url.slice(0, -4);
  16. }
  17. // normal file, let it go
  18. return {
  19. file: url,
  20. };
  21. },
  22. };