mirror of
https://github.com/cypress-io/cypress.git
synced 2026-01-06 06:29:45 -06:00
fox: avoid removing the types from vue, vue2 when install (#22814)
This commit is contained in:
committed by
GitHub
parent
2383cafa93
commit
97ec82009c
@@ -49,6 +49,7 @@ packlist({ path: currentPackageDir })
|
||||
|
||||
// After everything is copied, let's update the Cypress cli package.json['exports'] map.
|
||||
const isModule = currentPackageConfig.type === 'module'
|
||||
const types = currentPackageConfig.types
|
||||
|
||||
const cliPackageConfig = require(path.join(cliPath, 'package.json'))
|
||||
|
||||
@@ -65,6 +66,11 @@ packlist({ path: currentPackageDir })
|
||||
subPackageExports.require = `./${exportName}/${currentPackageConfig.main}`
|
||||
}
|
||||
|
||||
if (types) {
|
||||
// ./react/dist/cypress-react-cjs.js, etc
|
||||
subPackageExports.types = `./${exportName}/${types}`
|
||||
}
|
||||
|
||||
if (!cliPackageConfig.files.includes(exportName)) {
|
||||
cliPackageConfig.files.push(exportName)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user