MCPcopy
hub / github.com/toeverything/AFFiNE / dev

Method dev

tools/cli/src/bundle.ts:311–337  ·  view source on GitHub ↗
(
    pkg: Package,
    bundler: Bundler = getBundler(),
    devServerConfig?:
      | WebpackDevServerConfiguration
      | RspackDevServerConfiguration
  )

Source from the content-addressed store, hash-verified

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,

Callers 1

executeMethod · 0.45

Calls 4

getBundlerFunction · 0.90
devWithWebpackMethod · 0.80
devWithRspackMethod · 0.80

Tested by

no test coverage detected