mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-01-13 19:01:25 -06:00
fix: fix webdriverio ts setup
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
module.exports = (api, { tsLint = false, convertJsToTs = true } = {}) => {
|
||||
const jsRE = /\.js$/
|
||||
const excludeRE = /^tests\/e2e\/|(\.config|rc)\.js$/
|
||||
let excludeRE = /^tests\/e2e\/|(\.config|rc)\.js$/
|
||||
|
||||
if (api.hasPlugin('e2e-webdriverio')) {
|
||||
excludeRE = /(\.config|rc)\.js$/
|
||||
}
|
||||
const convertLintFlags = require('../lib/convertLintFlags')
|
||||
api.postProcessFiles(files => {
|
||||
if (convertJsToTs) {
|
||||
|
||||
@@ -93,7 +93,8 @@ module.exports = (api, {
|
||||
api.render('./template', {
|
||||
skipLibCheck,
|
||||
hasMocha: api.hasPlugin('unit-mocha'),
|
||||
hasJest: api.hasPlugin('unit-jest')
|
||||
hasJest: api.hasPlugin('unit-jest'),
|
||||
hasWebDriverIO: api.hasPlugin('e2e-webdriverio')
|
||||
})
|
||||
|
||||
if (isVue3) {
|
||||
|
||||
@@ -20,7 +20,11 @@
|
||||
"sourceMap": true,
|
||||
"baseUrl": ".",
|
||||
"types": [
|
||||
"webpack-env"<% if (hasMocha || hasJest) { %>,<% } %>
|
||||
"webpack-env"<% if (hasMocha || hasJest || hasWebDriverIO) { %>,<% } %>
|
||||
<%_ if (hasWebDriverIO) { _%>
|
||||
"@wdio/mocha-framework",
|
||||
"@wdio/sync"<% if (hasMocha || hasJest) { %>,<% } %>
|
||||
<%_ } _%>
|
||||
<%_ if (hasMocha) { _%>
|
||||
"mocha",
|
||||
"chai"
|
||||
|
||||
Reference in New Issue
Block a user