@playwright/experimental-ct-core 1.57.0-alpha-2025-10-15 → 1.57.0-alpha-2025-10-16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/viteUtils.js +2 -1
- package/package.json +3 -3
package/lib/viteUtils.js
CHANGED
|
@@ -138,8 +138,9 @@ function hasJSComponents(components) {
|
|
|
138
138
|
}
|
|
139
139
|
const importReactRE = /(^|\n|;)import\s+(\*\s+as\s+)?React(,|\s+)/;
|
|
140
140
|
const compiledReactRE = /(const|var)\s+React\s*=/;
|
|
141
|
+
const runtimeImportRequire = /import\(['"`]react['"`]\)|require\(['"`]react['"`]\)/i;
|
|
141
142
|
function transformIndexFile(id, content, templateDir, registerSource, importInfos) {
|
|
142
|
-
if (id.endsWith(".js") && content.includes("React.createElement") && !content.includes("__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED") && !content.match(importReactRE) && !content.match(compiledReactRE)) {
|
|
143
|
+
if (id.endsWith(".js") && content.includes("React.createElement") && !content.includes("__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED") && !content.match(importReactRE) && !content.match(compiledReactRE) && !content.match(runtimeImportRequire)) {
|
|
143
144
|
const code = `import React from 'react';
|
|
144
145
|
${content}`;
|
|
145
146
|
return { code, map: { mappings: "" } };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@playwright/experimental-ct-core",
|
|
3
|
-
"version": "1.57.0-alpha-2025-10-
|
|
3
|
+
"version": "1.57.0-alpha-2025-10-16",
|
|
4
4
|
"description": "Playwright Component Testing Helpers",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"playwright-core": "1.57.0-alpha-2025-10-
|
|
29
|
+
"playwright-core": "1.57.0-alpha-2025-10-16",
|
|
30
30
|
"vite": "^6.3.6",
|
|
31
|
-
"playwright": "1.57.0-alpha-2025-10-
|
|
31
|
+
"playwright": "1.57.0-alpha-2025-10-16"
|
|
32
32
|
}
|
|
33
33
|
}
|