Skip to content

Rspack plugin and loaders to build Angular applications

Notifications You must be signed in to change notification settings

Coly010/ng-rspack-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Angular Rspack Tools

GitHub Actions License

NPM Version NPM Version


Build Angular with Rspack

The goal of @ng-rspack/build and @ng-rspack/nx is to make easy and straightforward to build Angular applications with rspack.

Current Status: POC

Currently, this is still being viewed as a proof-of-concept.

There needs to be a lot more comprehensive testing before this is viable for real applications.

Current Objective: HMR

The current objective is to get HMR working correctly.

Right now, the state of it is as follows:

  • The global ng module is missing, causing warnings when HMR updates are applied.
  • Only changes to the following cause an HMR update:
    • Global Styles
    • Inline Templates
    • TS portion of Components
  • The following need support (non-exhaustive):
    • Inline Styles
    • Template Files
    • Component Style Files

Getting started

# Create a new nx workspace
npx create-nx-workspace ng-rspack-test
# Choose options:
# - Stack: None
# - Integrated Monorepo
# - CI: Do it later
# - Remote caching: Up to you

# Change into project directory and install the ng-rspack-build package
cd ng-rspack-test
npm install @ng-rspack/nx

# Run the app generator
npx nx g @ng-rspack/nx:app apps/myapp
# Choose stylesheet format and e2e framework

# Serve the app
npx nx serve myapp

# Build the app
npx nx build myapp

# Run the e2e tests
npx nx e2e myapp-e2e