We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e34bad commit bea3e64Copy full SHA for bea3e64
lib/component-normalizer.js
@@ -61,7 +61,16 @@ module.exports = function normalizeComponent (
61
hook = injectStyles
62
}
63
64
- if (hook) {
+ if (hook && options.functional && injectStyles) {
65
+ // inject styles for functioal component in vue file
66
+ const existing = options.render
67
+ options.render = function renderWithStyleInjection (h, context) {
68
+ hook(context)
69
+ return existing(h, context)
70
+ }
71
72
+
73
+ if (hook && !options.functional) {
74
// inject component registration as beforeCreate hook
75
var existing = options.beforeCreate
76
options.beforeCreate = existing
0 commit comments