index.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.build = build;
  6. var _base = require("./blocks/base");
  7. var _css = require("./blocks/css");
  8. var _images = require("./blocks/images");
  9. var _utils = require("./utils");
  10. async function build(config, { supportedBrowsers , rootDirectory , customAppFile , isDevelopment , isServer , isEdgeRuntime , targetWeb , assetPrefix , sassOptions , productionBrowserSourceMaps , future , experimental , disableStaticImages }) {
  11. const ctx = {
  12. supportedBrowsers,
  13. rootDirectory,
  14. customAppFile,
  15. isDevelopment,
  16. isProduction: !isDevelopment,
  17. isServer,
  18. isEdgeRuntime,
  19. isClient: !isServer,
  20. targetWeb,
  21. assetPrefix: assetPrefix ? assetPrefix.endsWith("/") ? assetPrefix.slice(0, -1) : assetPrefix : "",
  22. sassOptions,
  23. productionBrowserSourceMaps,
  24. future,
  25. experimental
  26. };
  27. let fns = [
  28. (0, _base).base(ctx),
  29. (0, _css).css(ctx)
  30. ];
  31. if (!disableStaticImages) {
  32. fns.push((0, _images).images(ctx));
  33. }
  34. const fn = (0, _utils).pipe(...fns);
  35. return fn(config);
  36. }
  37. //# sourceMappingURL=index.js.map