mirror of
https://github.com/cypress-io/cypress.git
synced 2026-03-12 20:39:22 -05:00
fix: Resolve types and dist issues with @cypress/puppeteer (#28424)
This commit is contained in:
@@ -3,4 +3,4 @@
|
||||
|
||||
### Features
|
||||
|
||||
* Add @cypress/puppeteer plugin ([#28370](https://github.com/cypress-io/cypress/issues/28370)) ([b34d145](https://github.com/cypress-io/cypress/commit/b34d14571689a9b36efc707a3a48f27edcb98113))
|
||||
* Initial release ([#28370](https://github.com/cypress-io/cypress/issues/28370)) ([b34d145](https://github.com/cypress-io/cypress/commit/b34d14571689a9b36efc707a3a48f27edcb98113))
|
||||
|
||||
@@ -35,7 +35,7 @@ Add the following in `tsconfig.json`:
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"types": ["cypress", "@cypress/puppeteer"]
|
||||
"types": ["cypress", "@cypress/puppeteer/support"]
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -55,7 +55,7 @@ While the `cy.puppeteer()` command is executed in the browser, the majority of t
|
||||
In your Cypress config (e.g. `cypress.config.ts`):
|
||||
|
||||
```typescript
|
||||
import { setup } from '@cypress/puppeteer/plugin'
|
||||
import { setup } from '@cypress/puppeteer'
|
||||
|
||||
export default defineConfig({
|
||||
e2e: {
|
||||
@@ -76,7 +76,7 @@ export default defineConfig({
|
||||
In your support file (e.g. `cypress/support/e2e.ts`):
|
||||
|
||||
```typescript
|
||||
import { setup } from '@cypress/puppeteer/support'
|
||||
import '@cypress/puppeteer/support'
|
||||
```
|
||||
|
||||
In your spec (e.g. `spec.cy.ts`):
|
||||
|
||||
@@ -37,9 +37,9 @@
|
||||
},
|
||||
"files": [
|
||||
"dist",
|
||||
"index.d.ts"
|
||||
"support"
|
||||
],
|
||||
"types": "index.d.ts",
|
||||
"types": "dist/plugin/index.d.ts",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
1
npm/puppeteer/support/index.js
Normal file
1
npm/puppeteer/support/index.js
Normal file
@@ -0,0 +1 @@
|
||||
require('../dist/support')
|
||||
@@ -14,11 +14,11 @@
|
||||
"strictNullChecks": true,
|
||||
"target": "ES2020",
|
||||
"types": [
|
||||
"cypress"
|
||||
"cypress",
|
||||
"./support"
|
||||
]
|
||||
},
|
||||
"include": [
|
||||
"index.d.ts",
|
||||
"src/"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user