(pkg: Package, bundler: Bundler = getBundler())
| 251 | } |
| 252 | |
| 253 | static async build(pkg: Package, bundler: Bundler = getBundler()) { |
| 254 | if (bundler === 'rspack' && !isRspackSupportedPackageName(pkg.name)) { |
| 255 | return BundleCommand.buildWithWebpack(pkg); |
| 256 | } |
| 257 | |
| 258 | switch (bundler) { |
| 259 | case 'webpack': |
| 260 | return BundleCommand.buildWithWebpack(pkg); |
| 261 | case 'rspack': |
| 262 | return BundleCommand.buildWithRspack(pkg); |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | static async buildWithWebpack(pkg: Package) { |
| 267 | process.env.NODE_ENV = 'production'; |
no test coverage detected