Playwright Plugin (Deprecated)
Relevant source files
The following files were used as context for generating this wiki page:
The @nx-extend/playwright package provides integration for the Playwright testing framework within an Nx workspace. It includes tools to initialize Playwright projects and run end-to-end (E2E) tests.
This package is officially deprecated and no longer maintained. Users should migrate to the official @nx/playwright plugin for continued support and updates.
Sources: packages/playwright/README.md:1-5, packages/playwright/README.md:38-40
Project Integration
The plugin integrates with the Nx workspace as a library project. It defines standard lifecycle targets for building, testing, and publishing the plugin itself.
Library Configuration
| Property | Value |
|---|---|
| Project Name | playwright |
| Project Type | library |
| Source Root | packages/playwright/src |
| Output Path | dist/packages/playwright |
Sources: packages/playwright/project.json:2-6, packages/playwright/project.json:23
Dependency Management
The plugin requires @nx/devkit as a peer dependency to interface with the Nx workspace.
{
"peerDependencies": {
"@nx/devkit": "^22.0.0"
}
}
Sources: packages/playwright/package.json:17-19
Core Features
Project Initialization
The plugin provides a generator to set up Playwright within a workspace project. This generator automates the initial configuration and file structure requirements.
| Generator | Implementation | Description |
|---|---|---|
init | ./src/generators/init/init.impl | Initializes a Playwright project |
Sources: packages/playwright/generators.json:5-9
E2E Test Execution
Running nx e2e <project> triggers Playwright directly. For complex scenarios requiring pre-requisite services, the plugin integrates with @nx-extend/e2e-runner.
Automated Service Workflow
This diagram shows how the E2E runner manages service startup before executing Playwright tests.
The diagram illustrates the flow from target execution to service verification and final test execution.
Sources: packages/playwright/README.md:21-36
Execution Options
The plugin supported various command-line options and internal helpers to facilitate testing environments.
- UI Mode: Added support for the
--uiflag to launch the Playwright interactive runner. - Storage State: Includes a
getStorageStateFileLocationhelper to resolve paths within thedistfolder for authentication states.
Sources: packages/playwright/CHANGELOG.md:188-190, packages/playwright/CHANGELOG.md:196-198
Deprecation and Migration
Support for this package ended with version 5.0.0. Maintenance stopped to favor the official @nx/playwright implementation. The @nx-extend/e2e-runner package includes automated migration paths to transition from this runner to the official Nx version.
Sources: packages/playwright/CHANGELOG.md:162-171, packages/e2e-runner/CHANGELOG.md:126-128
Lifecycle Comparison
| Aspect | @nx-extend/playwright | @nx/playwright (Successor) |
|---|---|---|
| Maintenance | Discontinued | Active |
| Nx Compatibility | Up to v22 (legacy support) | Current Nx Versions |
| Recommended Use | Legacy Workspaces | All new projects |
Sources: packages/playwright/README.md:38-40, packages/playwright/CHANGELOG.md:27-29
Conclusion
The @nx-extend/playwright plugin served as a bridge for Playwright integration in early Nx ecosystems. While it remains functional for legacy workspaces up to Nx v22, all active development has shifted to official Nx plugins.
Sources: packages/playwright/README.md:1-5, packages/playwright/CHANGELOG.md:162-171