Some Questions about how to create an App Extension #16760
Replies: 3 comments 4 replies
-
UPDATE It finally works but I used only app-extension folder. and removed dependenci on ui folder. |
Beta Was this translation helpful? Give feedback.
-
If you read the docs, you will see this:
That's an older page that was written before the UI kit was a thing. It can still be used for simple projects where you don't care about extra DX or the ability to use outside Quasar CLI, e.g. UMD, vite-plugin, etc. So, to sum up, when you are working with UI stuff, e.g. components, use the UI kit. UI kit has a better DX(better build system, dev playground, etc.) and is more flexible(being able to use outside Quasar CLI). Your components live inside |
Beta Was this translation helpful? Give feedback.
-
As I tried to add the components to UI instead of in app-extension, I can't build the ui folder. I have this component:
And when trying to build it it says: I suppose this is because Single-file components are not allowed in this build. And i don't know how to add a sfc plugin builder as this doesn't work with babel or webpack. |
Beta Was this translation helpful? Give feedback.
-
I've been working on a project for a year and now I will start in the same company more separate projects, so i want to reuse some components. I would like to create a component npm package.
I've been reading the docs: https://quasar.dev/app-extensions/development-guide/introduction
but I have a lot of questions.
Why do I have two folders?
'app-extension'
'ui'
I suppose that app-extension is the one that will be published and used on my quasar project. But it has a dependency on the ui one.
So I have to work on the ui one, then publish it and then update app-extension and publish it too?
Also in the docs https://quasar.dev/app-extensions/tips-and-tricks/provide-a-ui-component, when it shows a folder structure I don't know to which of the two folders is talking about because both folders have a different structure than the one defined here.
To me it looks like It's the app-extension one. As it contains an index.js and register.js, but it doesn't makes sense?
I tried creating a button component to test if it works and I'm not able to make it work.
What I don't understand is, If i have to create here the button, why does this file 'register.js' imports quasar-ui-my-components
When I add the package as App expansion to my project with 'quasar ext add my-components', I can't use my component. I can't even use the example component that autogenerates with the project
<KettalComponents></KettalComponents>
Beta Was this translation helpful? Give feedback.
All reactions