Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@remix-run/dev
Advanced tools
@remix-run/dev is a development tool for building web applications using the Remix framework. It provides a set of utilities and commands to streamline the development process, including building, watching, and serving your application.
Build
The build feature compiles the client and server entry points into a production-ready build. This is useful for preparing your application for deployment.
const { build } = require('@remix-run/dev');
build({
entryClientFile: 'src/entry.client.tsx',
entryServerFile: 'src/entry.server.tsx',
outputDir: 'build',
publicPath: '/build/',
}).then(() => {
console.log('Build completed!');
}).catch((error) => {
console.error('Build failed:', error);
});
Watch
The watch feature monitors your source files for changes and automatically rebuilds the application. This is useful for development as it provides instant feedback on code changes.
const { watch } = require('@remix-run/dev');
watch({
entryClientFile: 'src/entry.client.tsx',
entryServerFile: 'src/entry.server.tsx',
outputDir: 'build',
publicPath: '/build/',
}).then(() => {
console.log('Watching for changes...');
}).catch((error) => {
console.error('Watch failed:', error);
});
Serve
The serve feature starts a local development server to serve your built application. This is useful for testing your application in a local environment.
const { serve } = require('@remix-run/dev');
serve({
buildDir: 'build',
port: 3000,
}).then(() => {
console.log('Server is running on http://localhost:3000');
}).catch((error) => {
console.error('Server failed to start:', error);
});
Webpack is a popular module bundler for JavaScript applications. It offers similar functionalities to @remix-run/dev, such as building, watching, and serving applications. However, Webpack is more general-purpose and can be used with various frameworks and libraries.
Parcel is a web application bundler that offers zero-configuration setup. It provides similar features to @remix-run/dev, including building, watching, and serving applications. Parcel is known for its ease of use and fast performance.
Vite is a build tool that aims to provide a faster and leaner development experience for modern web projects. It offers similar functionalities to @remix-run/dev, such as building, watching, and serving applications. Vite is optimized for speed and efficiency, making it a strong alternative.
Remix is a web framework that helps you build better websites with React.
To get started, open a new shell and run:
npx create-remix@latest
Then follow the prompts you see in your terminal.
For more information about Remix, visit remix.run!
v2.13.0
Date: 2024-10-11
This release stabilizes a handful of "unstable" APIs in preparation for the pending React Router v7 release (see these posts for more info):
unstable_data
→ data
(for use with Single Fetch)unstable_flushSync
→ flushSync
(useSubmit
, fetcher.load
, fetcher.submit
)unstable_viewTransition
→ viewTransition
(<Link>
, <Form>
, useNavigate
, useSubmit
)future.unstable_optimizeDeps
→ future.v3_optimizeDeps
(Docs)~~
future.unstable_optimizeDeps
in 2.13.1
future.unstable_lazyRouteDiscovery
→ future.v3_lazyRouteDiscovery
(Docs)future.unstable_singleFetch
→ future.v3_singleFetch
(Docs)unstable_dataStrategy
-> dataStrategy
unstable_patchRoutesOnNavigation
-> patchRoutesOnNavigation
unstable_data()
-> data()
unstable_viewTransition
-> viewTransition
(Link
, Form
, navigate
, submit
)unstable_flushSync>
-> <Link viewTransition>
(Link
, Form
, navigate
, submit
, useFetcher
)future.unstable_lazyRouteDiscovery
-> future.v3_lazyRouteDiscovery
future.unstable_optimizeDeps
-> future.v3_optimizeDeps
future.unstable_singleFetch
-> future.v3_singleFetch
@remix-run/dev
- Stop passing request.signal
as the renderToReadableStream
signal
to abort server rendering for cloudflare/deno runtimes because by the time that request
is aborted, aborting the rendering is useless because there's no way for React to flush down the unresolved boundaries (#10047)
remix vite:dev
because we were incorrectly aborting requests after successful renders - which was causing us to abort a completed React render, and try to close an already closed ReadableStream
request.signal
on successful rendersentry.server
files no longer pass a signal
to renderToReadableStream
because adding a timeout-based abort signal to the default behavior would constitute a breaking changeentry.server
via remix reveal entry.server
, and the template entry.server files have been updated with an example approach for newly created Remix apps@remix-run/express
- Fix adapter logic for aborting request.signal
so we don't incorrectly abort on the close
event for successful requests (#10046)@remix-run/react
- Fix bug with clientLoader.hydrate
in a layout route when hydrating with bubbled errors (#10063)create-remix
@remix-run/architect
@remix-run/cloudflare
@remix-run/cloudflare-pages
@remix-run/cloudflare-workers
@remix-run/css-bundle
@remix-run/deno
@remix-run/dev
@remix-run/eslint-config
@remix-run/express
@remix-run/node
@remix-run/react
@remix-run/serve
@remix-run/server-runtime
@remix-run/testing
Full Changelog: v2.12.1...v2.13.0
FAQs
Dev tools and CLI for Remix
The npm package @remix-run/dev receives a total of 130,494 weekly downloads. As such, @remix-run/dev popularity was classified as popular.
We found that @remix-run/dev demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.