Skip to content

Commit abc9a23

Browse files
committed
do not warn vue-loader scoped css attributes
1 parent e9b87a3 commit abc9a23

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

src/compiler/compile.js

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,23 @@ exports.compileRoot = function (el, options, contextOptions) {
211211
}
212212
} else if (process.env.NODE_ENV !== 'production' && containerAttrs) {
213213
// warn container directives for fragment instances
214-
var names = containerAttrs.map(function (attr) {
215-
return '"' + attr.name + '"'
216-
}).join(', ')
217-
var plural = containerAttrs.length > 1
218-
_.warn(
219-
'Attribute' + (plural ? 's ' : ' ') + names +
220-
(plural ? ' are' : ' is') + ' ignored on component ' +
221-
'<' + options.el.tagName.toLowerCase() + '> because ' +
222-
'the component is a fragment instance: ' +
223-
'http://vuejs.org/guide/components.html#Fragment_Instance'
224-
)
214+
var names = containerAttrs
215+
.filter(function (attr) {
216+
return attr.name.indexOf('_v-') < 0
217+
})
218+
.map(function (attr) {
219+
return '"' + attr.name + '"'
220+
})
221+
if (names.length) {
222+
var plural = names.length > 1
223+
_.warn(
224+
'Attribute' + (plural ? 's ' : ' ') + names.join(',') +
225+
(plural ? ' are' : ' is') + ' ignored on component ' +
226+
'<' + options.el.tagName.toLowerCase() + '> because ' +
227+
'the component is a fragment instance: ' +
228+
'http://vuejs.org/guide/components.html#Fragment_Instance'
229+
)
230+
}
225231
}
226232

227233
return function rootLinkFn (vm, el, scope) {

0 commit comments

Comments
 (0)