New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vite-express

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-express - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1

11

dist/main.js

@@ -173,3 +173,5 @@ 'use strict';

const config = yield getViteConfig();
app.get("/*", (req, res, next) => __awaiter(this, void 0, void 0, function* () {
app.use(config.base, (req, res, next) => __awaiter(this, void 0, void 0, function* () {
if (req.method !== "GET")
return next();
if (isIgnoredPath(req.path, req))

@@ -193,6 +195,7 @@ return next();

const distPath = yield getDistPath();
app.use("*", (req, res, next) => {
if (isIgnoredPath(req.baseUrl, req))
const config = yield getViteConfig();
app.use(config.base, (req, res, next) => {
if (isIgnoredPath(req.path, req))
return next();
const indexPath = findClosestIndexToRoot(req.originalUrl, distPath);
const indexPath = findClosestIndexToRoot(req.path, distPath);
if (indexPath === undefined)

@@ -199,0 +202,0 @@ return next();

{
"name": "vite-express",
"version": "0.11.0",
"version": "0.11.1",
"main": "dist/main.js",

@@ -5,0 +5,0 @@ "types": "dist/main.d.ts",

@@ -218,5 +218,12 @@ # ⚡ Vite + Express

Why `nested/subroute/my/secret/path/index.html` isn't considered? Because it needs to have a trailing `/`. That's how Vite is doing it.
If you want, you can always use express [redirect][express-redirect] to add this trailing slash at the end.
Please remember that you still have to [configure `Vite`][vite-multipage] so that it will resolve all these files correctly in its build step.
```js
app.get('^nested/subroute/my/secret/path$', (_, res) => {
res.redirect("nested/subroute/my/secret/path/")
});
```
⚠️ Please remember that you still have to [configure `Vite`][vite-multipage] so that it will resolve all these files correctly in its build step.
## 🤖 Transforming HTML

@@ -389,2 +396,3 @@

[express-request]: https://expressjs.com/en/api.html#req
[express-redirect]: https://expressjs.com/en/api.html#res.redirect
[vite-config]: https://vitejs.dev/config/

@@ -391,0 +399,0 @@ [root]: https://vitejs.dev/config/shared-options.html#root

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc