@nx/rspack
TypeScript icon, indicating that this package has built-in type declarations

18.0.2 • Public • Published

Nx - Smart, Fast and Extensible Build System


Nx: Smart, Fast and Extensible Build System

Nx is a next generation build system with first class monorepo support and powerful integrations.

This package is a Rspack plugin for Nx.

Getting Started

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

e.g.

npx create-nx-workspace@latest rspack-demo --preset=@nx/rspack

Now, you can go into the rspack-demo folder and start development.

cd rspack-demo
npm start

You can also run lint, test, and e2e scripts for the project.

npm run lint
npm run test
npm run e2e

Existing workspaces

You can add Rspack to any existing Nx workspace.

First, install the plugin:

npm install --save-dev @nx/rspack

Then, run the rspack-project generator:

npx nx g @nx/rspack:rspack-project --skipValidation

Note: The --skipValidation option allows you to overwrite existing build targets.

Workspace libraries

The @nx/rspack executor support importing workspace libs into the app.

npx nx g @nx/react:lib mylib

Import the new library in your app.

// src/app/app.tsx
import { Mylib } from '@rspack-demo/mylib';

// ...

export default function App() {
  return <MyLib />;
}

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

npm start

Note: You must restart the server if you make any changes to your library.

Readme

Keywords

Package Sidebar

Install

npm i @nx/rspack

Homepage

nx.dev

Weekly Downloads

1,006

Version

18.0.2

License

MIT

Unpacked Size

143 kB

Total Files

87

Last publish

Collaborators

  • jack-nrwl
  • nrwl-jason
  • nrwlowner
  • martin.malinowski
  • nexumag