Skip to content

Component Framework global components are not correctly loaded when using pug + scoped style #138

Open
@Shinigami92

Description

@Shinigami92

Describe the bug

With Quasar I'm using the @quasar/vite-plugin v1.1.1 and the plugin property autoImportComponentCase: 'pascal'
When using this in combination with a template lang=pug and style scoped I get warnings and a blank white page with no rendered content.

At Quasar Land (Discord) we (@yusufkandemir, @patak-dev and me) already found out that there is a new incompatibility coming from @vitejs/plugin-vue >= v3 and that the template also gets applied a scoped query param where as when not using pug it does not.

image https://discord.com/channels/415874313728688138/902518756436226079/1002122942852902964

image https://discord.com/channels/415874313728688138/902518756436226079/1002127704138715176


Current workaround:
Using a css class named like the component and use that instead of scoped keyword.

Reproduction

https://stackblitz.com/edit/vitejs-vite-llrb6t?file=src%2FApp.vue,package.json,src%2Fmain.ts,vite.config.ts&terminal=dev

System Info

System:
    OS: macOS 12.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 4.91 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.4.0 - ~/.nvm/versions/node/v18.4.0/bin/node
    npm: 8.12.1 - ~/.nvm/versions/node/v18.4.0/bin/npm
  Browsers:
    Chrome: 103.0.5060.134
    Safari: 15.5
  npmPackages:
    @vitejs/plugin-vue: ~3.0.1 => 3.0.1 
    vite: ~3.0.3 => 3.0.3

Used Package Manager

pnpm

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions