You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: packages/vue-template-compiler/README.md
+20-2
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,24 @@ This is only useful at runtime with pre-configured builds, so it doesn't accept
79
79
80
80
---
81
81
82
+
### compiler.ssrCompile(template, [options])
83
+
84
+
> 2.4.0+
85
+
86
+
Same as `compiler.compile` but generates SSR-specific render function code by optimizing parts of the template into string concatenation in order to improve SSR performance.
87
+
88
+
This is used by default in `vue-loader@>=12` and can be disabled using the [optimizeSSR](https://vue-loader.vuejs.org/en/options.html#optimizessr) option.
89
+
90
+
---
91
+
92
+
### compiler.ssrCompileToFunction(template)
93
+
94
+
> 2.4.0+
95
+
96
+
Same as `compiler.compileToFunction` but generates SSR-specific render function code by optimizing parts of the template into string concatenation in order to improve SSR performance.
97
+
98
+
---
99
+
82
100
### compiler.parseComponent(file, [options])
83
101
84
102
Parse a SFC (single-file component, or `*.vue` file) into a descriptor (refer to the `SFCDescriptor` type in [flow declarations](https://github.com/vuejs/vue/blob/dev/flow/compiler.js)). This is used in SFC build tools like `vue-loader` and `vueify`.
@@ -89,5 +107,5 @@ Parse a SFC (single-file component, or `*.vue` file) into a descriptor (refer to
89
107
90
108
`pad` is useful when you are piping the extracted content into other pre-processors, as you will get correct line numbers or character indices if there are any syntax errors.
91
109
92
-
- with `{ pad:"line" }`, the extracted content for each block will be prefixed with one newline for each line in the leading content from the original file to ensure that the line numbers align with the original file.
93
-
- with `{ pad:"space" }`, the extracted content for each block will be prefixed with one space for each character in the leading content from the original file to ensure that the character count remains the same as the original file.
110
+
- with `{ pad:"line" }`, the extracted content for each block will be prefixed with one newline for each line in the leading content from the original file to ensure that the line numbers align with the original file.
111
+
- with `{ pad:"space" }`, the extracted content for each block will be prefixed with one space for each character in the leading content from the original file to ensure that the character count remains the same as the original file.
0 commit comments