This repository was archived by the owner on Jan 18, 2022. It is now read-only.
File tree 4 files changed +19
-8
lines changed
4 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 44
44
],
45
45
"dependencies" : {
46
46
"@babel/runtime" : " ^7.0.0-beta.46" ,
47
- "@vue/component-compiler" : " ^3.4.4 " ,
47
+ "@vue/component-compiler" : " ^3.6 " ,
48
48
"@vue/component-compiler-utils" : " ^2.1.0" ,
49
49
"debug" : " ^2.6.0" ,
50
50
"hash-sum" : " ^1.0.2" ,
51
51
"querystring" : " ^0.2.0" ,
52
- "rollup-pluginutils" : " ^2.0.1"
52
+ "rollup-pluginutils" : " ^2.0.1" ,
53
+ "vue-runtime-helpers" : " ^0.2.0"
53
54
},
54
55
"devDependencies" : {
55
56
"@babel/core" : " ^7.0.0-beta.46" ,
Original file line number Diff line number Diff line change @@ -115,6 +115,10 @@ export default function VuePlugin(opts: VuePluginOptions = {}): Plugin {
115
115
d ( `Build environment: ${ isProduction ? 'production' : 'development' } ` )
116
116
d ( `Build target: ${ process . env . VUE_ENV || 'browser' } ` )
117
117
118
+ if ( ! opts . normalizer ) opts . normalizer = '~vue-runtime-helpers/normalize-component.js'
119
+ if ( ! opts . styleInjector ) opts . styleInjector = '~vue-runtime-helpers/inject-style/browser.js'
120
+ if ( ! opts . styleInjectorSSR ) opts . styleInjectorSSR = '~vue-runtime-helpers/inject-style/server.js'
121
+
118
122
createVuePartRequest . defaultLang = {
119
123
...createVuePartRequest . defaultLang ,
120
124
...opts . defaultLang
@@ -207,8 +211,10 @@ export default function VuePlugin(opts: VuePluginOptions = {}): Plugin {
207
211
descriptors . set ( filename , descriptor )
208
212
const input : any = {
209
213
scopeId,
210
- styles : descriptor . styles . map ( style =>
211
- compiler . compileStyle ( filename , scopeId , style )
214
+ styles : await Promise . all (
215
+ descriptor . styles . map ( style =>
216
+ compiler . compileStyleAsync ( filename , scopeId , style )
217
+ )
212
218
) ,
213
219
customBlocks : [ ]
214
220
}
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ const cache = {}
17
17
export async function build ( filename , css = false ) : Promise < string > {
18
18
const cacheKey = JSON . stringify ( { filename, css} )
19
19
if ( cacheKey in cache ) return cache [ cacheKey ]
20
- let style : string | undefined
20
+ let style : string = ''
21
21
const input = filename + '__app.js'
22
22
const options = { defaultLang : { markdown : 'pluginMarkdown' } , css : css , style : {
23
23
postcssPlugins : [ assets ( { basePath : '/' } ) ]
Original file line number Diff line number Diff line change 1269
1269
source-map "^0.5.6"
1270
1270
vue-template-es2015-compiler "^1.6.0"
1271
1271
1272
- " @vue/component-compiler@^3.4.4 " :
1273
- version "3.4.4 "
1274
- resolved "https://registry.yarnpkg.com/@vue/component-compiler/-/component-compiler-3.4.4 .tgz#4bec11116116c292f1f865afc2d88421953fc393 "
1272
+ " @vue/component-compiler@^3.6 " :
1273
+ version "3.6.0 "
1274
+ resolved "https://registry.yarnpkg.com/@vue/component-compiler/-/component-compiler-3.6.0 .tgz#8db313e50eaa2903cef5aac68c37a09364dba79d "
1275
1275
dependencies :
1276
1276
" @vue/component-compiler-utils" " ^2.1.0"
1277
1277
clean-css "^4.1.11"
@@ -8902,6 +8902,10 @@ vue-router@^3.0.1:
8902
8902
version "3.0.1"
8903
8903
resolved "https://registry.yarnpkg.com/vue-router/-/vue-router-3.0.1.tgz#d9b05ad9c7420ba0f626d6500d693e60092cc1e9"
8904
8904
8905
+ vue-runtime-helpers@^0.2.0 :
8906
+ version "0.2.0"
8907
+ resolved "https://registry.yarnpkg.com/vue-runtime-helpers/-/vue-runtime-helpers-0.2.0.tgz#8f8aa9e5ed40be2f3716c3ef8ee5e319290bedde"
8908
+
8905
8909
vue-server-renderer@^2.5.16 :
8906
8910
version "2.5.16"
8907
8911
resolved "https://registry.yarnpkg.com/vue-server-renderer/-/vue-server-renderer-2.5.16.tgz#279ef8e37e502a0de3a9ae30758cc04a472eaac0"
You can’t perform that action at this time.
0 commit comments