(
pkg: Package,
bundler: Bundler = getBundler(),
devServerConfig?:
| WebpackDevServerConfiguration
| RspackDevServerConfiguration
)
| 309 | } |
| 310 | |
| 311 | static async dev( |
| 312 | pkg: Package, |
| 313 | bundler: Bundler = getBundler(), |
| 314 | devServerConfig?: |
| 315 | | WebpackDevServerConfiguration |
| 316 | | RspackDevServerConfiguration |
| 317 | ) { |
| 318 | if (bundler === 'rspack' && !isRspackSupportedPackageName(pkg.name)) { |
| 319 | return BundleCommand.devWithWebpack( |
| 320 | pkg, |
| 321 | devServerConfig as WebpackDevServerConfiguration | undefined |
| 322 | ); |
| 323 | } |
| 324 | |
| 325 | switch (bundler) { |
| 326 | case 'webpack': |
| 327 | return BundleCommand.devWithWebpack( |
| 328 | pkg, |
| 329 | devServerConfig as WebpackDevServerConfiguration | undefined |
| 330 | ); |
| 331 | case 'rspack': |
| 332 | return BundleCommand.devWithRspack( |
| 333 | pkg, |
| 334 | devServerConfig as RspackDevServerConfiguration | undefined |
| 335 | ); |
| 336 | } |
| 337 | } |
| 338 | |
| 339 | static async devWithWebpack( |
| 340 | pkg: Package, |
no test coverage detected