html-bundle 6.1.0 → 6.1.2

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.
package/dist/utils.mjs CHANGED
@@ -31,11 +31,11 @@ export async function createDefaultServer(isSecure) {
31
31
  }
32
32
  : void 0);
33
33
  fastify.setNotFoundHandler(async (_req, reply) => {
34
+ reply.type("text/html");
34
35
  const file = await readFile(path.join(process.cwd(), bundleConfig.build, "/index.html"), {
35
36
  encoding: "utf-8",
36
37
  });
37
- reply.header("Content-Type", "text/html; charset=UTF-8");
38
- return reply.send(addHMRCode(file, `${bundleConfig.src}/index.html`));
38
+ return reply.send(file);
39
39
  });
40
40
  fastify.register(fastifyStatic, {
41
41
  root: path.join(process.cwd(), bundleConfig.build),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-bundle",
3
- "version": "6.1.0",
3
+ "version": "6.1.2",
4
4
  "description": "A very simple bundler for HTML SFC",
5
5
  "bin": "./dist/bundle.mjs",
6
6
  "types": "./src/config.d.ts",
@@ -32,19 +32,19 @@
32
32
  },
33
33
  "bugs": "https://github.com/Krutsch/html-bundle/issues",
34
34
  "dependencies": {
35
- "@fastify/static": "^7.0.0",
35
+ "@fastify/static": "^7.0.1",
36
36
  "@web/parse5-utils": "^2.1.0",
37
37
  "await-spawn": "^4.0.2",
38
- "chokidar": "^3.5.3",
38
+ "chokidar": "^3.6.0",
39
39
  "critters": "^0.0.20",
40
40
  "cssnano": "^6.0.3",
41
41
  "esbuild": "^0.20.0",
42
- "fastify": "^4.26.0",
42
+ "fastify": "^4.26.1",
43
43
  "glob": "^10.3.10",
44
44
  "html-minifier-terser": "^7.2.0",
45
45
  "hydro-js": "^1.5.14",
46
46
  "parse5": "^7.1.2",
47
- "postcss": "^8.4.34",
48
- "postcss-load-config": "^5.0.2"
47
+ "postcss": "^8.4.35",
48
+ "postcss-load-config": "^5.0.3"
49
49
  }
50
50
  }
package/src/utils.mts CHANGED
@@ -51,14 +51,14 @@ export async function createDefaultServer(isSecure: boolean) {
51
51
  : void 0
52
52
  );
53
53
  fastify.setNotFoundHandler(async (_req, reply) => {
54
+ reply.type("text/html");
54
55
  const file = await readFile(
55
56
  path.join(process.cwd(), bundleConfig.build, "/index.html"),
56
57
  {
57
58
  encoding: "utf-8",
58
59
  }
59
60
  );
60
- reply.header("Content-Type", "text/html; charset=UTF-8");
61
- return reply.send(addHMRCode(file, `${bundleConfig.src}/index.html`));
61
+ return reply.send(file);
62
62
  });
63
63
  fastify.register(fastifyStatic, {
64
64
  root: path.join(process.cwd(), bundleConfig.build),