Home / Function/ validate() — vue Function Reference

validate() — vue Function Reference

Architecture documentation for the validate() function in util.ts from the vue codebase.

Entity Profile

Dependency Diagram

graph TD
  efb47da4_06ae_2717_101a_4055fdc1a1e4["validate()"]
  18e811fb_6a44_e4ce_30bb_8457653dc5d4["apply()"]
  18e811fb_6a44_e4ce_30bb_8457653dc5d4 -->|calls| efb47da4_06ae_2717_101a_4055fdc1a1e4
  style efb47da4_06ae_2717_101a_4055fdc1a1e4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/server-renderer/src/webpack-plugin/util.ts lines 10–33

export const validate = compiler => {
  if (compiler.options.target !== 'node') {
    warn('webpack config `target` should be "node".')
  }

  if (compiler.options.output) {
    if (compiler.options.output.library) {
      // Webpack >= 5.0.0
      if (compiler.options.output.library.type !== 'commonjs2') {
        warn('webpack config `output.library.type` should be "commonjs2".')
      }
    } else if (compiler.options.output.libraryTarget !== 'commonjs2') {
      // Webpack < 5.0.0
      warn('webpack config `output.libraryTarget` should be "commonjs2".')
    }
  }

  if (!compiler.options.externals) {
    tip(
      'It is recommended to externalize dependencies in the server build for ' +
        'better build performance.'
    )
  }
}

Subdomains

Called By

Frequently Asked Questions

What does validate() do?
validate() is a function in the vue codebase.
What calls validate()?
validate() is called by 1 function(s): apply.

Analyze Your Own Codebase

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

Try Supermodel Free