JSPM

@nx/rspack

18.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 633808
  • Score
    100M100P100Q177108F
  • License MIT

Package Exports

  • @nx/rspack
  • @nx/rspack/src/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@nx/rspack) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.