Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky committed Jun 26, 2023
1 parent b740bd0 commit ff03cf5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
devServerPort: 9000,
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { Options } from '@wdio/types'

export const config: Options.Testrunner = {
services: ['intercept'],
// services: [
// services: [ /* Using webpack-dev-server instead */
// [
// 'static-server',
// {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
const path = require('path')
const globby = require('globby')
import path from 'path'
import globby from 'globby'
import type { Configuration as WebpackConfiguration } from 'webpack'

// in case you run into any typescript error when configuring `devServer`
import 'webpack-dev-server'

// This config is for bundling fixtures in order to serve the pages that webdriver.io will use in its tests.
const files = globby.sync('src/page-bundles/*/index.ts', { cwd: __dirname })
Expand All @@ -13,8 +17,7 @@ const entries = files.reduce((acc, file) => {
}
}, {})

/** @type { import('webpack').Configuration } */
const config = {
const config: WebpackConfiguration = {
devServer: {
static: {
directory: path.join(__dirname, 'public'),
Expand Down Expand Up @@ -52,4 +55,4 @@ const config = {
},
}

module.exports = config
export default config

0 comments on commit ff03cf5

Please sign in to comment.