-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
Description
Vue.js version
2.0.0
Reproduction Link
Steps to reproduce
// components/index.js export Foo, Bar etc.
import * as components from './components';
export default {
name: 'app',
components
};
What is Expected?
Show ok without errors.
What is actually happening?
Browser throw error components has only getter.
Reasons
function normalizeComponents (options) {
if (options.components) {
var components = options.components;
var def;
for (var key in components) {
var lower = key.toLowerCase();
if (isBuiltInTag(lower) || config.isReservedTag(lower)) {
"development" !== 'production' && warn(
'Do not use built-in or reserved HTML elements as component ' +
'id: ' + key
);
continue
}
def = components[key];
if (isPlainObject(def)) {
// should create or clone new components object inside Vue
// instead of old one
components[key] = Vue$3.extend(def);
}
}
}
}