-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-import seems to be not working inside functional components #5373
Comments
https://quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework Did you try to have |
I'm seeing similar in components from app extensions. Even if I manually add them to the boot-file in the index.js rigger, when combined with auto in the consuming quasar.conf.js, they are not hooked. It would probably make sense to merge auto with whatever is manually configured. @webnoob |
Quasar import {QIcon} from 'quasar'
component.options.components = Object.assign({QIcon}, component.options.components || {}) Functional components however do not accept the component.options.components = ... We can't declare (locally register) vue components inside a functional component, this is by design. Why functional components do not accept To be able to use a vue component inside a functional component you need to register it globally (not recommended) or use a workaround like: vuejs/vue#7492 (comment) Now for the auto import feature, the In any case this is a bug, and quasar should not add extra code that gets disregarded (assigning to |
* fix(webpack): auto-import loader auto-import loader should not process functional components See #5373 * Update loader.auto-import.js * Update loader.auto-import.js
Thank you for the write-up @ejez ! It's 100% accurate. |
* fix(webpack): auto-import loader auto-import loader should not process functional components See quasarframework#5373 * Update loader.auto-import.js * Update loader.auto-import.js
Describe the bug
When I use quasar component inside functional component, using auto-import feature, I get
To Reproduce
The text was updated successfully, but these errors were encountered: