@marko/run 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,6 +68,7 @@ import zlib from "node:zlib";
68
68
  import Table from "cli-table3";
69
69
  import kleur from "kleur";
70
70
  import format from "human-format";
71
+ import { Blob } from "buffer";
71
72
  var HttpVerbColors = {
72
73
  get: kleur.green,
73
74
  post: kleur.magenta,
@@ -1199,6 +1199,7 @@ var import_node_zlib = __toESM(require("node:zlib"), 1);
1199
1199
  var import_cli_table3 = __toESM(require("cli-table3"), 1);
1200
1200
  var import_kleur = __toESM(require("kleur"), 1);
1201
1201
  var import_human_format = __toESM(require("human-format"), 1);
1202
+ var import_buffer = require("buffer");
1202
1203
  var HttpVerbColors = {
1203
1204
  get: import_kleur.default.green,
1204
1205
  post: import_kleur.default.magenta,
@@ -1284,7 +1285,7 @@ function gzipSize(source) {
1284
1285
  return import_node_zlib.default.gzipSync(source, { level: 9 }).length;
1285
1286
  }
1286
1287
  function byteSize(source) {
1287
- return new Blob([source]).size;
1288
+ return new import_buffer.Blob([source]).size;
1288
1289
  }
1289
1290
  function computeChunkSize(chunk, bundle, seen = /* @__PURE__ */ new Set()) {
1290
1291
  if (chunk.type === "asset") {
@@ -1642,7 +1643,7 @@ function markoRun(opts = {}) {
1642
1643
  }
1643
1644
  if (virtualFiles.has(importee)) {
1644
1645
  resolved = importee;
1645
- if (isBuild && !ssr && isMarkoFile(resolved)) {
1646
+ if (!ssr && isMarkoFile(resolved)) {
1646
1647
  resolved += browserEntryQuery;
1647
1648
  }
1648
1649
  }
@@ -1650,6 +1651,9 @@ function markoRun(opts = {}) {
1650
1651
  },
1651
1652
  async load(id) {
1652
1653
  var _a;
1654
+ if (id.endsWith(browserEntryQuery)) {
1655
+ id = id.slice(0, -browserEntryQuery.length);
1656
+ }
1653
1657
  if (virtualFiles.has(id)) {
1654
1658
  if (!isRendered) {
1655
1659
  await renderVirtualFiles();
@@ -1157,6 +1157,7 @@ import zlib from "node:zlib";
1157
1157
  import Table from "cli-table3";
1158
1158
  import kleur from "kleur";
1159
1159
  import format from "human-format";
1160
+ import { Blob } from "buffer";
1160
1161
  var HttpVerbColors = {
1161
1162
  get: kleur.green,
1162
1163
  post: kleur.magenta,
@@ -1600,7 +1601,7 @@ function markoRun(opts = {}) {
1600
1601
  }
1601
1602
  if (virtualFiles.has(importee)) {
1602
1603
  resolved = importee;
1603
- if (isBuild && !ssr && isMarkoFile(resolved)) {
1604
+ if (!ssr && isMarkoFile(resolved)) {
1604
1605
  resolved += browserEntryQuery;
1605
1606
  }
1606
1607
  }
@@ -1608,6 +1609,9 @@ function markoRun(opts = {}) {
1608
1609
  },
1609
1610
  async load(id) {
1610
1611
  var _a;
1612
+ if (id.endsWith(browserEntryQuery)) {
1613
+ id = id.slice(0, -browserEntryQuery.length);
1614
+ }
1611
1615
  if (virtualFiles.has(id)) {
1612
1616
  if (!isRendered) {
1613
1617
  await renderVirtualFiles();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marko/run",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "The Marko application framework.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/marko-js/run/tree/main/packages/run",
@@ -112,7 +112,7 @@
112
112
  "typescript": "^4.7.4"
113
113
  },
114
114
  "dependencies": {
115
- "@marko/vite": "^2.4.4",
115
+ "@marko/vite": "^2.4.6",
116
116
  "cli-table3": "^0.6.3",
117
117
  "compression": "^1.7.4",
118
118
  "dotenv": "^16.0.3",