Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
"@cypress/webpack-preprocessor": "5.4.1",
"babel-plugin-istanbul": "6.0.0",
"debug": "4.1.1",
"find-webpack": "1.9.2",
"find-webpack": "1.10.1",
"mime-types": "2.1.26"
},
"release": {
Expand Down
13 changes: 5 additions & 8 deletions plugins/load-webpack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@ module.exports = (on, config) => {
}
debug('got webpack config filename %s', webpackFilename)
const resolved = path.resolve(webpackFilename)
debug('resolved webpack at %s', webpackFilename)

let webpackOptions = require(resolved)
debug('loaded webpack options: %o', webpackOptions)
if (webpackOptions.default) {
// we probably loaded TS file
debug('loaded webpack options has .default - taking that as the config')
webpackOptions = webpackOptions.default
debug('resolved webpack at %s', resolved)

const webpackOptions = findWebpack.tryLoadingWebpackConfig(resolved)
if (!webpackOptions) {
throw new Error(`Could not load webpack config from ${resolved}`)
}

debug('webpack options: %o', webpackOptions)
Expand Down