Explorar o código

Add support attribute module (#4091)

* Add support attribute module

To be able to use css-module

* Extend type SFCBlock

module?: string | boolean

* package vue-template-compiler update

* Revert "package vue-template-compiler update"

This reverts commit 0104458d631115d1abf8d7a6a694a1d84b9b0fc5.
Victor Zakharenko %!s(int64=9) %!d(string=hai) anos
pai
achega
5a4c1d7f70
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  1. 1 0
      flow/compiler.js
  2. 3 0
      src/sfc/parser.js

+ 1 - 0
flow/compiler.js

@@ -151,4 +151,5 @@ declare type SFCBlock = {
   lang?: string;
   src?: string;
   scoped?: boolean;
+  module?: string | boolean;
 }

+ 3 - 0
src/sfc/parser.js

@@ -61,6 +61,9 @@ export function parseComponent (
       if (attr.name === 'scoped') {
         block.scoped = true
       }
+      if (attr.name === 'module') {
+        block.module = attr.value || true
+      }
       if (attr.name === 'src') {
         block.src = attr.value
       }