Skip to content

Commit 0045196

Browse files
committed
refactor: @cypress/webpack-preprocessor should be a peer dep
1 parent 2b104b4 commit 0045196

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

packages/@vue/cli-plugin-e2e-cypress/__tests__/cypressPlugin.spec.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ if (!process.env.APPVEYOR) {
1313
}
1414
})
1515

16+
const pkg = JSON.parse(await project.read('package.json'))
17+
expect(pkg.devDependencies).toHaveProperty('@cypress/webpack-preprocessor')
18+
1619
const config = JSON.parse(await project.read('cypress.json'))
1720
config.video = false
1821
await project.write('cypress.json', JSON.stringify(config))

packages/@vue/cli-plugin-e2e-cypress/generator/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ module.exports = api => {
55
})
66

77
api.extendPackage({
8+
devDependencies: {
9+
'@cypress/webpack-preprocessor': '^3.0.0'
10+
},
811
scripts: {
912
'test:e2e': 'vue-cli-service test:e2e'
1013
}

packages/@vue/cli-plugin-e2e-cypress/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
"access": "public"
2323
},
2424
"dependencies": {
25-
"@cypress/webpack-preprocessor": "^3.0.0",
2625
"@vue/cli-shared-utils": "^3.0.4",
2726
"cypress": "^3.0.2",
2827
"eslint-plugin-cypress": "^2.0.1"
28+
},
29+
"peerDependencies": {
30+
"@cypress/webpack-preprocessor": "^3.0.0"
2931
}
3032
}

0 commit comments

Comments
 (0)