
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
remix-vite
Advanced tools
remix-vite
helps you serve Remix apps locally using Vite.
The quickest way to get started is to just run npx remix-vite
in your project's directory.
If you prefer, you can also install the package globally (you'll need at least Node LTS):
> npm install --global remix-vite
Once that's done, you can run this command inside your project's directory...
> remix-vite
Now you understand how the package works! :tada:
If you want to use remix-vite
with a custom remix server, you can do so by integrating your server with vite dev server.
Let's say you have a custom Express server and you want to use it with remix-vite
. Here is how you can do it:
const express = require('express');
const { createRequestHandler } = require('@remix-run/express');
const { createRemixViteDevServer, getRemixViteBuild } = require('remix-vite');
const app = express();
// Create a remix-vite dev server.
createRemixViteDevServer().then((remixViteDevServer) => {
// Use remix-vite dev server as middleware.
app.use(remixViteDevServer.middlewares);
app.all('*', async (req, res, next) => {
purgeRequireCache();
// Get the remix build generated by remix-vite.
const remixBuild = await getRemixViteBuild(remixViteDevServer);
// Create a remix express request handler.
const requestHandler = createRequestHandler({ build: remixBuild });
await requestHandler(req, res, next);
});
// Start the server.
app.listen(3000, () => {
console.log('Listening at http://localhost:3000');
});
});
function purgeRequireCache() {
// purge require cache on requests for "server side HMR" this won't let
// you have in-memory objects between requests in development.
for (const key in require.cache) {
delete require.cache[key];
}
}
If you want to change the host and port just pass --host and --port flag to remix-vite. Default host is localhost
and port is 3000
> remix-vite --port=4000
If you want a feature to be added, or wish to report a bug, please open an issue here.
Mayke Freitas (@sudomf)
FAQs
Static file serving and directory listing
The npm package remix-vite receives a total of 20 weekly downloads. As such, remix-vite popularity was classified as not popular.
We found that remix-vite demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.