From 4d9097930722e01ffb5ff3a86735f1d296c8ca48 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Fri, 8 Dec 2023 09:10:30 -0500 Subject: [PATCH] add pnpm example --- docs/angular/build-options.md | 43 +++++++++++++++++++++++++++++++---- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/docs/angular/build-options.md b/docs/angular/build-options.md index 642b1d8b0f3..652935c7d24 100644 --- a/docs/angular/build-options.md +++ b/docs/angular/build-options.md @@ -1,3 +1,6 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # Build Options Developers have two options for using Ionic components: Standalone or Modules. This guide covers both options as well as the benefits and downsides of each approach. @@ -179,12 +182,22 @@ export class HomePage {} Ionic Angular's standalone components use ES Modules. As a result, developers using Jest should ensure that ES Modules are transpiled to a format that Jest can use. Developers using Jest should add the following to their Jest config: + + + ```json -{ - ..., - "transformIgnorePatterns": ["node_modules/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)/)"] -} + +"transformIgnorePatterns": ["/node_modules/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)/)"] +``` + + + +```json + +"transformIgnorePatterns": ["/node_modules/.pnpm/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)@)"] ``` + + ### Usage with NgModule-based Applications @@ -326,6 +339,28 @@ export class HomePageModule {} Go to Foo Page ``` +**Testing** + +Ionic Angular's standalone components use ES Modules. As a result, developers using Jest should ensure that ES Modules are transpiled to a format that Jest can use. Developers using Jest should add the following to their Jest config: + + + + +```json + +"transformIgnorePatterns": ["/node_modules/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)/)"] +``` + + + +```json + +"transformIgnorePatterns": ["/node_modules/.pnpm/(?!(@ionic/angular|@ionic/core|ionicons|@stencil/core|@angular/*)@)"] +``` + + + + ## Modules ### Overview