Skip to content

optimize the production build results #292

Open
@edison1105

Description

Note that this is not a real bug, just an optimization item.

see Playground

It seems no need to wrap it as an IIFE.

setup(__props) {
  const msg = ref('Hello World!')
  return ((_ctx) => {
    const n0 = t0()
    _setInheritAttrs(false)
    _renderEffect(() => _setText(n0, msg.value))
    return n0
  })()
}

better is:

setup(__props) {
  const msg = ref('Hello World!')
  const n0 = t0()
  _setInheritAttrs(false)
  _renderEffect(() => _setText(n0, msg.value))
  return n0
}

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions