Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nx/remix

Package Overview
Dependencies
Maintainers
5
Versions
637
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nx/remix

  • 16.7.0-beta.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15K
increased by38.24%
Maintainers
5
Weekly downloads
 
Created
Source

Nx - Smart, Fast and Extensible Build System

Next generation full stack framework and build system together. Build better websites with Remix and Nx.

Nx makes supercharges your builds, and the optional Nx Cloud provide out-of-the-box distributed caching, distributed task execution, and valuable workspace insights.

Creating new Remix workspace

Use --preset=@nx/remix when creating new workspace.

e.g.

npx create-nx-workspace@latest acme \
--preset=@nx/remix \
--project=demo

Now, you can go into the acme folder and start development.

cd acme
npx nx dev demo

Note: This command runs the dev script in apps/demo/package.json.

Start the production server with one command.

npx nx start demo

Note: This will run the build before starting (as defined in nx.json).

Existing workspaces

You can add Remix to any existing Nx workspace.

First, install the plugin:

npm install --save-dev @nx/remix

# Or with yarn
yarn add -D @nx/remix

Then, run the setup generator:

npx nx g @nx/remix:setup

You can then add your first app and run it:

npx nx g @nx/remix:app demo

Adding new routes

Add a new route with one command.

npx nx g route

# e.g.
npx nx g route foo/bar --project=demo

Browse to http://localhost:3000/foo/bar to see the new route.

Workspace libraries

The Remix setup leverages npm/yarn/pnpm workspaces and Nx buildable libraries.

npx nx g @nx/remix:lib mylib

Import the new library in your app.

// apps/demo/app/root.tsx
import { Mylib } from '@acme/mylib';

// ...

export default function App() {
  return (
    <Document>
      <Layout>
        <Mylib />
        <Outlet />
      </Layout>
    </Document>
  );
}

Now, run the dev server again to see the new library in action.

npx nx dev demo

Note: You must restart the server if you make any changes to your library. Luckily, with Nx cache this operation should be super fast.

Contributing

Running unit tests

Run nx test demo to execute the unit tests via Jest.

Publishing

nx publish demo --ver=[version]

FAQs

Package last updated on 24 Aug 2023

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