Socket
Socket
Sign inDemoInstall

@remix-run/dev

Package Overview
Dependencies
Maintainers
2
Versions
1008
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@remix-run/dev

Dev tools and CLI for Remix


Version published
Weekly downloads
347K
decreased by-5.02%
Maintainers
2
Weekly downloads
 
Created

What is @remix-run/dev?

@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.

What are @remix-run/dev's main functionalities?

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);
});

Other packages similar to @remix-run/dev

FAQs

Package last updated on 19 Sep 2024

Did you know?

Socket

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.

Install

Related posts

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