This repository was archived by the owner on Jan 18, 2022. It is now read-only.
File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ export default function PluginVue(userOptions: Partial<Options> = {}): Plugin {
85
85
86
86
return undefined
87
87
} ,
88
+
88
89
load ( id ) {
89
90
const query = parseVuePartRequest ( id )
90
91
@@ -192,6 +193,9 @@ export default function PluginVue(userOptions: Partial<Options> = {}): Plugin {
192
193
source : block . content ,
193
194
scoped : block . scoped ,
194
195
modules : ! ! block . module ,
196
+ modulesOptions : options . cssModulesOptions ,
197
+ preprocessLang : block . lang as any ,
198
+ preprocessCustomRequire : options . preprocessCustomRequire ,
195
199
} )
196
200
197
201
if ( result . errors . length ) {
@@ -477,8 +481,8 @@ function attrsToQuery(attrs: SFCBlock['attrs'], langFallback?: string): string {
477
481
} `
478
482
}
479
483
}
480
- if ( langFallback && ! ( `lang` in attrs ) ) {
481
- query += `&lang.${ langFallback } `
484
+ if ( langFallback ) {
485
+ query += `lang` in attrs ? `. ${ langFallback } ` : ` &lang.${ langFallback } `
482
486
}
483
487
return query
484
488
}
@@ -522,6 +526,5 @@ function genCSSModulesCode(
522
526
return code
523
527
}
524
528
525
- // overwrite TS generated exports for commonjs usage
526
- // but preserves typing
529
+ // overwrite for cjs require('rollup-plugin-vue')() usage
527
530
module . exports = PluginVue
You can’t perform that action at this time.
0 commit comments