You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 22, 2024. It is now read-only.
When trying to upgrade to webpack v5 (recommended by terra-dev-site here) and webpack-dev-server v4, the webpack config provides a devServer configuration that is following the v3 API resulting in this error:
[webpack-cli] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options has an unknown property 'stats'. These properties are valid:
object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, setupExitSignals?, static?, watchFiles?, webSocketServer? }
Downgrading just webpack-dev-server to v3 causes hot reloading to stop working (webpack will re-compile but the dev server will not reload the site).
If you patch the webpack config to support webpack-dev-server v4, it becomes invalid when running WDIO tests with terra-functional-testing because the AssetServerService in there uses webpack-dev-server v3.
Right now the result is, despite webpack-config-terra supporting webpack v5, I still have to stay on webpack v4 (and webpack-dev-server and webpack-cli v3) to make all the other tools in the ecosystem work nicely.
Steps to Reproduce
Upgrade webpack to v5, webpack-cli and webpack-dev-server to v4
Create a webpack configuration with @cerner/webpack-config-terra and @cerner/terra-dev-site
Expected Behavior
The terra tools should detect the installed versions of the webpack tools and provide appropriate configurations.
Possible Solution
Along with checking the webpack version, webpack-config-terra should also check the webpack-dev-server version to determine the appropriate configuration for devServer.
terra-functional-testing should have a peer dependency on webpack-dev-server and should likewise provide the appropriate configuration based on the installed version.
Bug Report
Description
When trying to upgrade to webpack v5 (recommended by terra-dev-site here) and webpack-dev-server v4, the webpack config provides a
devServer
configuration that is following the v3 API resulting in this error:Downgrading just webpack-dev-server to v3 causes hot reloading to stop working (webpack will re-compile but the dev server will not reload the site).
If you patch the webpack config to support webpack-dev-server v4, it becomes invalid when running WDIO tests with terra-functional-testing because the AssetServerService in there uses webpack-dev-server v3.
Right now the result is, despite webpack-config-terra supporting webpack v5, I still have to stay on webpack v4 (and webpack-dev-server and webpack-cli v3) to make all the other tools in the ecosystem work nicely.
Steps to Reproduce
Expected Behavior
The terra tools should detect the installed versions of the webpack tools and provide appropriate configurations.
Possible Solution
Along with checking the webpack version, webpack-config-terra should also check the webpack-dev-server version to determine the appropriate configuration for
devServer
.terra-functional-testing should have a peer dependency on webpack-dev-server and should likewise provide the appropriate configuration based on the installed version.
Environment
@ Mentions
The text was updated successfully, but these errors were encountered: