feat(compiler-sfc): add ssr option
This commit is contained in:
parent
38f0269765
commit
3b2d236714
@ -33,6 +33,7 @@
|
||||
"@vue/shared": "3.0.0-alpha.8",
|
||||
"@vue/compiler-core": "3.0.0-alpha.8",
|
||||
"@vue/compiler-dom": "3.0.0-alpha.8",
|
||||
"@vue/compiler-ssr": "3.0.0-alpha.8",
|
||||
"consolidate": "^0.15.1",
|
||||
"hash-sum": "^2.0.0",
|
||||
"lru-cache": "^5.1.1",
|
||||
|
@ -32,6 +32,7 @@ export interface SFCTemplateCompileResults {
|
||||
export interface SFCTemplateCompileOptions {
|
||||
source: string
|
||||
filename: string
|
||||
ssr?: boolean
|
||||
inMap?: RawSourceMap
|
||||
compiler?: TemplateCompiler
|
||||
compilerOptions?: CompilerOptions
|
||||
@ -106,7 +107,8 @@ function doCompileTemplate({
|
||||
filename,
|
||||
inMap,
|
||||
source,
|
||||
compiler = require('@vue/compiler-dom'),
|
||||
ssr = false,
|
||||
compiler = ssr ? require('@vue/compiler-ssr') : require('@vue/compiler-dom'),
|
||||
compilerOptions = {},
|
||||
transformAssetUrls
|
||||
}: SFCTemplateCompileOptions): SFCTemplateCompileResults {
|
||||
|
Loading…
Reference in New Issue
Block a user