@pracht/vite-plugin 0.1.2 → 0.1.4

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.
Files changed (2) hide show
  1. package/dist/index.mjs +4 -3
  2. package/package.json +4 -4
package/dist/index.mjs CHANGED
@@ -256,7 +256,8 @@ function generatePagesAppInlineSource(options, root = process.cwd()) {
256
256
  function createDevSSRMiddleware(server, _pluginOptions) {
257
257
  return async (req, res, next) => {
258
258
  const url = req.url ?? "/";
259
- if (url.includes(".") || url.startsWith("/node_modules/")) return next();
259
+ const pathname = new URL(url, "http://localhost").pathname;
260
+ if (pathname.includes(".") || pathname.startsWith("/node_modules/")) return next();
260
261
  try {
261
262
  const [framework, serverMod] = await Promise.all([server.ssrLoadModule("@pracht/core"), server.ssrLoadModule(PRACHT_SERVER_MODULE_ID)]);
262
263
  let webRequest;
@@ -356,8 +357,8 @@ function resolveOptions(options) {
356
357
  };
357
358
  }
358
359
  function readClientBuildAssets(root = process.cwd()) {
359
- const manifestPath = resolve(root, "dist/client/.vite/manifest.json");
360
- if (!existsSync(manifestPath)) return {
360
+ const manifestPath = ["dist/client/.vite/manifest.json", "dist/.vite/manifest.json"].map((candidate) => resolve(root, candidate)).find((candidate) => existsSync(candidate));
361
+ if (!manifestPath) return {
361
362
  clientEntryUrl: null,
362
363
  cssManifest: {},
363
364
  jsManifest: {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pracht/vite-plugin",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "homepage": "https://github.com/JoviDeCroock/pracht/tree/main/packages/vite-plugin",
5
5
  "bugs": {
6
6
  "url": "https://github.com/JoviDeCroock/pracht/issues"
@@ -29,9 +29,9 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@preact/preset-vite": "^2.10.5",
32
- "@pracht/adapter-cloudflare": "0.0.4",
33
- "@pracht/adapter-vercel": "0.0.4",
34
- "@pracht/core": "0.2.1"
32
+ "@pracht/adapter-cloudflare": "0.0.6",
33
+ "@pracht/adapter-vercel": "0.0.6",
34
+ "@pracht/core": "0.2.3"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@cloudflare/vite-plugin": "^1.0.0",