#Qwik application directory structure

25 messages · Page 1 of 1 (latest)

midnight basin
#

Can someone point me to the recommended structure for qwik that include libraries?
I have the following structure, but I am wondering if it is optimized. I am wondering if I have to add another toplevel qwik application where whould I put it.

Libraries are the directories starting with @, while the main application is the com.ehrjm folder.

So, could the libaries exist outside the main app folder since libraries are appllication themselves less router?

slim sluice
#

And it's in a monorepo with a docs site / application

midnight basin
slim sluice
midnight basin
#

@slim sluice To get started:

  1. How do I create the monorepo - if I know what package you are using for this, then the proceeding two I could do from the instructions.
  2. How do I create an app for the monorep
  3. How do I create a library for the monorep
slim sluice
#

What I linked above is more future facing for vite 8 with the rolldown config / vite libraries

midnight basin
#

I will check it out. In your repo, I don't see at Text widget as yet. Does it go by another name?

slim sluice
midnight basin
slim sluice
#

You can see how it's used in the field browser tests

midnight basin
#

👍 Are the finished component ready for primetime?

slim sluice
#

And worse case scenario you can copy the code if I don't have time to get to it

#

Just be aware that docs are WIP so you may have to ask me some questions

midnight basin
#

Thanks

midnight basin
#

@slim sluice I have the following Field embeded in a component

  <div style={{ padding: '0.75rem' }}>
    <Field.Root
      disabled={disabled}
      name={name}
      onChange$={onChange$}
      readOnly={readOnly}
      required={required}
      value={value}
    >
      <Field.Label>{label}</Field.Label>
      <Field.Input placeholder={placeholder} type="text" />
      {description ? (
        <Field.Description>{description}</Field.Description>
      ) : null}
      {error ? <Field.Error>{error}</Field.Error> : null}
    </Field.Root>
  </div>

However, nothing is displayed in the browser and no error is displayed in the console. Maybe I am thinking that a provider similar to QwikProvider is missing in the root.tsx file. However due to absence of docs I cannot verify same.

slim sluice
#

cc @twin plover

twin plover
#

@midnight basin you're using latest beta and there's no error when you click around in dev?

midnight basin
#

"@builder.io/qwik": "^1.17.2",
"@builder.io/qwik-city": "^1.17.2"
"@qds.dev/ui": "^0.6.2",

No suggestions that anything is off.

slim sluice