akauppi / GroundLevel-firebase-es

[ANCHORED] Stencil for operational web apps
https://groundlevel-sep22.web.app/
Other
23 stars 3 forks source link

How to resolve `aside-keys` web component correctly? #29

Closed akauppi closed 3 years ago

akauppi commented 3 years ago

Vue seems to need to be told which components are web components and which not.

We have one, aside-keys, built separately, coming via npm. Importing it causes this:

$ npm run dev:online

...
> dev:online
> concurrently --kill-others-on-fail -n log,vite "npm run --silent _dev_online_log" "npm run --silent _dev_online_vite"

[vite] 
[vite]   ⚡Vite dev server running at:
[vite] 
[vite]   > Local:    http://localhost:3001/
[vite]   > Network:  http://192.168.1.62:3001/
[vite] 
[vite]   ready in 246ms.
[vite] 
[log] [01.967] WARN: Vue warning: Failed to resolve component: aside-keys {"trace":"at <App>"}
[log] [01.968] INFO: App is mounted.
...

The documentation linked to above instructs to set "rules.options.compilerOptions.isCustomElement" in "web pack config". Since it's Vite, there is no webpack.

How can I do the same, under Vite 2.0 beta?

akauppi commented 3 years ago

Solved by https://github.com/vitejs/vite/issues/1312