diff --git a/docs/functions/react18Plugin.html b/docs/functions/react18Plugin.html index 979c56c..58da0d0 100644 --- a/docs/functions/react18Plugin.html +++ b/docs/functions/react18Plugin.html @@ -1,2 +1,2 @@ react18Plugin | React18 Loaders

Function react18Plugin

This plugin prevents building test files by esbuild. DTS may still geenrate type files for the tests with only { } as file content

-
+
diff --git a/docs/interfaces/React18PluginOptions.html b/docs/interfaces/React18PluginOptions.html index a3ada9c..0ba3ba5 100644 --- a/docs/interfaces/React18PluginOptions.html +++ b/docs/interfaces/React18PluginOptions.html @@ -1,4 +1,4 @@ -React18PluginOptions | React18 Loaders

Interface React18PluginOptions

interface React18PluginOptions {
    buildReplacePatterns?: ReplacePattern[];
    disableJSXRequireDedup?: boolean;
    ignorePatterns?: ignorePattern[];
    keepTestIds?: boolean;
    keepTests?: boolean;
    sourceReplacePatterns?: ReplacePattern[];
}

Properties

buildReplacePatterns? +React18PluginOptions | React18 Loaders

Interface React18PluginOptions

interface React18PluginOptions {
    buildReplacePatterns?: ReplacePattern[];
    disableJSXRequireDedup?: boolean;
    ignorePatterns?: ignorePattern[];
    keepTestIds?: boolean;
    keepTests?: boolean;
    sourceReplacePatterns?: ReplacePattern[];
}

Properties

buildReplacePatterns?: ReplacePattern[]

regExp patterns to find and replace in build files after build Use with caution! Make sure the same file does not match multiple patterns to avoid any unexpected results.

-
disableJSXRequireDedup?: boolean

In case you face any errors, or you want to speed up build a bit, try disabling deduplication of require("react/jsx-runtime")

-
ignorePatterns?: ignorePattern[]

regExp patterns to match file paths to be ignored. +

disableJSXRequireDedup?: boolean

In case you face any errors, or you want to speed up build a bit, try disabling deduplication of require("react/jsx-runtime")

+
ignorePatterns?: ignorePattern[]

regExp patterns to match file paths to be ignored. If contentPatterns are provided, only the files at matching paths containing one or more of the content patterns will be ignored

-
keepTestIds?: boolean

to not remove data-testid attributes. If keepTests is true, +

keepTestIds?: boolean

to not remove data-testid attributes. If keepTests is true, data-testid attributes will not be removed irrespective of keepTestIds value. This attribute is useful when setting sourceReplacePatterns

-
keepTests?: boolean

to not ignore test files

-
sourceReplacePatterns?: ReplacePattern[]

regExp patterns to find and replace in source files before build

+
keepTests?: boolean

to not ignore test files

+
sourceReplacePatterns?: ReplacePattern[]

regExp patterns to find and replace in source files before build

Use with caution! Make sure the same file does not match multiple patterns to avoid any unexpected results.

Caution! - if you have not enabled keepTests, we are already using /.*\.[jt]sx?$/ pattern to remove `

data-testidattributes. If yoursourceReplacePatternscollide with these files, please setkeepTestIdstotrue` and handle removing testids yourself.

-
+
diff --git a/docs/interfaces/_internal_.ReplacePattern.html b/docs/interfaces/_internal_.ReplacePattern.html index 1981b46..5de709b 100644 --- a/docs/interfaces/_internal_.ReplacePattern.html +++ b/docs/interfaces/_internal_.ReplacePattern.html @@ -1,3 +1,3 @@ -ReplacePattern | React18 Loaders
interface ReplacePattern {
    pathPattern: RegExp;
    replaceParams: { pattern: RegExp; substitute: string }[];
}

Properties

pathPattern +ReplacePattern | React18 Loaders
interface ReplacePattern {
    pathPattern: RegExp;
    replaceParams: { pattern: RegExp; substitute: string }[];
}

Properties

pathPattern: RegExp
replaceParams: { pattern: RegExp; substitute: string }[]
+

Properties

pathPattern: RegExp
replaceParams: { pattern: RegExp; substitute: string }[]
diff --git a/docs/interfaces/_internal_.ignorePattern.html b/docs/interfaces/_internal_.ignorePattern.html index 789de9d..18b85be 100644 --- a/docs/interfaces/_internal_.ignorePattern.html +++ b/docs/interfaces/_internal_.ignorePattern.html @@ -1,3 +1,3 @@ -ignorePattern | React18 Loaders
interface ignorePattern {
    contentPatterns?: RegExp[];
    pathPattern: RegExp;
}

Properties

contentPatterns? +ignorePattern | React18 Loaders
interface ignorePattern {
    contentPatterns?: RegExp[];
    pathPattern: RegExp;
}

Properties

contentPatterns?: RegExp[]
pathPattern: RegExp
+

Properties

contentPatterns?: RegExp[]
pathPattern: RegExp
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 92c49ba..840604c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3276,8 +3276,9 @@ packages: resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} - es-shim-unscopables@1.0.2: - resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} + es-shim-unscopables@1.1.0: + resolution: {integrity: sha512-d9T8ucsEhh8Bi1woXCf+TIKDIROLG5WCkxg8geBCbvk22kzwC5G2OnXVMO6FUsvQlgUUXQ2itephWDLqDzbeCw==} + engines: {node: '>= 0.4'} es-to-primitive@1.3.0: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} @@ -9569,7 +9570,7 @@ snapshots: es-abstract: 1.23.9 es-errors: 1.3.0 es-object-atoms: 1.1.1 - es-shim-unscopables: 1.0.2 + es-shim-unscopables: 1.1.0 array.prototype.findlastindex@1.2.5: dependencies: @@ -9578,21 +9579,21 @@ snapshots: es-abstract: 1.23.9 es-errors: 1.3.0 es-object-atoms: 1.1.1 - es-shim-unscopables: 1.0.2 + es-shim-unscopables: 1.1.0 array.prototype.flat@1.3.3: dependencies: call-bind: 1.0.8 define-properties: 1.2.1 es-abstract: 1.23.9 - es-shim-unscopables: 1.0.2 + es-shim-unscopables: 1.1.0 array.prototype.flatmap@1.3.3: dependencies: call-bind: 1.0.8 define-properties: 1.2.1 es-abstract: 1.23.9 - es-shim-unscopables: 1.0.2 + es-shim-unscopables: 1.1.0 array.prototype.tosorted@1.1.4: dependencies: @@ -9600,7 +9601,7 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.9 es-errors: 1.3.0 - es-shim-unscopables: 1.0.2 + es-shim-unscopables: 1.1.0 arraybuffer.prototype.slice@1.0.4: dependencies: @@ -10380,7 +10381,7 @@ snapshots: has-tostringtag: 1.0.2 hasown: 2.0.2 - es-shim-unscopables@1.0.2: + es-shim-unscopables@1.1.0: dependencies: hasown: 2.0.2