@hono/vite-dev-server
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -5,3 +5,10 @@ import { getRequestListener } from "@hono/node-server"; | ||
injectClientScript: true, | ||
exclude: [".*\\.ts", ".*\\.tsx", "/@.+", "\\/node_modules\\/.*"] | ||
exclude: [ | ||
/.*\.ts$/, | ||
/.*\.tsx$/, | ||
/^\/@.+$/, | ||
/^\/favicon\.ico$/, | ||
/^\/static\/.+/, | ||
/^\/node_modules\/.*/ | ||
] | ||
}; | ||
@@ -27,3 +34,3 @@ const nullScript = "export default { fetch: () => new Response(null, { status: 404 }) };"; | ||
for (const pattern of exclude) { | ||
const regExp = new RegExp(`^${pattern}$`); | ||
const regExp = pattern instanceof RegExp ? pattern : new RegExp(`^${pattern}$`); | ||
if (req.url && regExp.test(req.url)) { | ||
@@ -30,0 +37,0 @@ return next(); |
{ | ||
"name": "@hono/vite-dev-server", | ||
"description": "Vite dev-server plugin for Hono", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"types": "dist/index.d.ts", | ||
"module": "dist/index.js", | ||
"type": "module", | ||
"scripts": { | ||
"test": "playwright test -c test/playwright.config.ts test/e2e.test.ts", | ||
"build": "rimraf dist && tsup && publint", | ||
"watch": "tsup --watch", | ||
"prepublishOnly": "yarn build && yarn test", | ||
"release": "bumpp --tag \"@hono/vite-dev-server@v%s\" --commit \"chore(dev-server): release v%s\" && pnpm publish" | ||
}, | ||
"files": [ | ||
@@ -47,14 +54,8 @@ "dist" | ||
"engines": { | ||
"node": ">=18.0.0" | ||
"node": ">=18.14.1" | ||
}, | ||
"dependencies": { | ||
"@hono/node-server": "^1.2.0", | ||
"miniflare": "^3.20230904.0" | ||
}, | ||
"scripts": { | ||
"test": "pnpm exec playwright test -c test/playwright.config.ts test/e2e.test.ts", | ||
"build": "rimraf dist && tsup && publint", | ||
"watch": "tsup --watch", | ||
"release": "bumpp --tag \"@hono/vite-dev-server@v%s\" --commit \"chore(dev-server): release v%s\" && pnpm publish" | ||
"miniflare": "^3.20231016.0" | ||
} | ||
} |
@@ -126,3 +126,10 @@ # @hono/vite-dev-server | ||
injectClientScript: true, | ||
exclude: ['.*.ts', '.*.tsx', '/@.+', '/node_modules/.*'], | ||
exclude: [ | ||
/.*\.ts$/, | ||
/.*\.tsx$/, | ||
/^\/@.+$/, | ||
/^\/favicon\.ico$/, | ||
/^\/static\/.+/, | ||
/^\/node_modules\/.*/, | ||
], | ||
} | ||
@@ -139,3 +146,3 @@ ``` | ||
If you have static files in `public/static/*` and want to return them, exclude `/static/*` as follows: | ||
If you have static files in `public/assets/*` and want to return them, exclude `/assets/*` as follows: | ||
@@ -149,3 +156,3 @@ ```ts | ||
devServer({ | ||
exclude: ['^/static/.*', ...defaultOptions.exclude], | ||
exclude: ['/assets/.*', ...defaultOptions.exclude], | ||
}), | ||
@@ -152,0 +159,0 @@ ], |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9733
100
216
Updatedminiflare@^3.20231016.0