From 5a4c1d7f70f96bb1ebf47c10c0f420d2ed9d5584 Mon Sep 17 00:00:00 2001 From: Victor Zakharenko Date: Thu, 3 Nov 2016 17:53:43 +0300 Subject: [PATCH] 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. --- flow/compiler.js | 1 + src/sfc/parser.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/flow/compiler.js b/flow/compiler.js index 5a331e50..a99052d8 100644 --- a/flow/compiler.js +++ b/flow/compiler.js @@ -151,4 +151,5 @@ declare type SFCBlock = { lang?: string; src?: string; scoped?: boolean; + module?: string | boolean; } diff --git a/src/sfc/parser.js b/src/sfc/parser.js index 6b8530a8..6393885e 100644 --- a/src/sfc/parser.js +++ b/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 }