Socket
Socket
Sign inDemoInstall

@vue/compiler-ssr

Package Overview
Dependencies
6
Maintainers
1
Versions
203
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @vue/compiler-ssr

@vue/compiler-ssr


Version published
Weekly downloads
5M
increased by4.04%
Maintainers
1
Install size
3.15 MB
Created
Weekly downloads
 

Package description

What is @vue/compiler-ssr?

The @vue/compiler-ssr package is part of the Vue.js framework and is responsible for compiling Vue components into server-side renderable code. It is used in server-side rendering (SSR) applications to pre-render Vue components on the server before sending them to the client. This can improve performance and SEO for Vue.js applications.

What are @vue/compiler-ssr's main functionalities?

Compiling Vue components for SSR

This feature allows you to compile Vue.js templates into render functions that can be used on the server. The code sample demonstrates how to compile a simple Vue template into a server-renderable format.

const { compile } = require('@vue/compiler-ssr');
const template = `<div>{{ message }}</div>`;
const { code } = compile(template);
console.log(code);

Optimizing template compilation for SSR

The package provides options to optimize the compilation process for server-side rendering. The code sample shows how to enable SSR-specific optimizations during the compilation of a Vue template.

const { compile } = require('@vue/compiler-ssr');
const template = `<div>{{ message }}</div>`;
const { code } = compile(template, { optimizeSSR: true });
console.log(code);

Other packages similar to @vue/compiler-ssr

Changelog

Source

3.3.10 (2023-12-04)

Bug Fixes

  • app: prevent template from being cached between apps with different options (#9724) (ec71585), closes #9618
  • compiler-sfc: avoid passing forEach index to genMap (f12db7f)
  • compiler-sfc: deindent pug/jade templates (6345197), closes #3231 #3842 #7723
  • compiler-sfc: fix :where and :is selector in scoped mode with multiple selectors (#9735) (c3e2c55), closes #9707
  • compiler-sfc: generate more treeshaking friendly code (#9507) (8d74ca0), closes #9500
  • compiler-sfc: support inferring generic types (#8511) (eb5e307), closes #8482
  • compiler-sfc: support resolving components from props (#8785) (7cbcee3)
  • compiler-sfc: throw error when failing to load TS during type resolution (#8883) (4936d2e)
  • cssVars: cssVar names should be double-escaped when generating code for ssr (#8824) (5199a12), closes #7823
  • deps: update compiler to ^7.23.4 (#9681) (31f6ebc)
  • runtime-core: Suspense get anchor properly in Transition (#9309) (65f3fe2), closes #8105
  • runtime-dom: set width/height with units as attribute (#8781) (bfc1838)
  • ssr: avoid computed being accidentally cached before server render (#9688) (30d5d93), closes #5300
  • types: expose emits as props in functional components (#9234) (887e54c)
  • types: fix reactive collection types (#8960) (ad27473), closes #8904
  • types: improve return type withKeys and withModifiers (#9734) (43c3cfd)

Performance Improvements

  • optimize on* prop check (38aaa8c)
  • runtime-dom: cache modifier wrapper functions (da4a4fb), closes #8882
  • v-on: constant handlers with modifiers should not be treated as dynamic (4d94ebf)

Readme

Source

@vue/compiler-ssr

Keywords

FAQs

Last updated on 04 Dec 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc