Home / Function/ createWebpackBundleRenderer() — vue Function Reference

createWebpackBundleRenderer() — vue Function Reference

Architecture documentation for the createWebpackBundleRenderer() function in compile-with-webpack.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  540224ce_6cb5_3e51_d00c_e35582fdc063["createWebpackBundleRenderer()"]
  950d0fe5_079f_4a43_2035_55c6f0c25ee4["createAssertions()"]
  950d0fe5_079f_4a43_2035_55c6f0c25ee4 -->|calls| 540224ce_6cb5_3e51_d00c_e35582fdc063
  e1a19777_77cf_cd7d_5044_3ebeaacddb7d["createRendererWithManifest()"]
  e1a19777_77cf_cd7d_5044_3ebeaacddb7d -->|calls| 540224ce_6cb5_3e51_d00c_e35582fdc063
  cf13a947_8804_c821_8653_f052b90b701f["compileWithWebpack()"]
  540224ce_6cb5_3e51_d00c_e35582fdc063 -->|calls| cf13a947_8804_c821_8653_f052b90b701f
  style 540224ce_6cb5_3e51_d00c_e35582fdc063 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/server-renderer/test/compile-with-webpack.ts lines 50–73

export async function createWebpackBundleRenderer(
  file: string,
  options?: RenderOptions & { asBundle?: boolean }
) {
  const asBundle = !!(options && options.asBundle)
  if (options) delete options.asBundle

  const fs = await compileWithWebpack(file, {
    target: 'node',
    devtool: asBundle ? 'source-map' : false,
    output: {
      path: '/',
      filename: 'bundle.js',
      libraryTarget: 'commonjs2'
    },
    externals: [require.resolve('../../../dist/vue.runtime.common.js')],
    plugins: asBundle ? [new VueSSRServerPlugin()] : []
  })

  const bundle = asBundle
    ? JSON.parse(fs.readFileSync('/vue-ssr-server-bundle.json', 'utf-8'))
    : fs.readFileSync('/bundle.js', 'utf-8')
  return createBundleRenderer(bundle, options)
}

Domain

Subdomains

Frequently Asked Questions

What does createWebpackBundleRenderer() do?
createWebpackBundleRenderer() is a function in the vue codebase.
What does createWebpackBundleRenderer() call?
createWebpackBundleRenderer() calls 1 function(s): compileWithWebpack.
What calls createWebpackBundleRenderer()?
createWebpackBundleRenderer() is called by 2 function(s): createAssertions, createRendererWithManifest.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free