Skip to content

scaffolding bug in MainLayout.vue for Options API #18227

@amc1999

Description

@amc1999

What happened?

If Options API selected during scaffolding then MainLayout.vue should not import ref. It should not be:

import { defineComponent, ref } from 'vue'

but:

import { defineComponent } from 'vue'

As it is today result failed with:

npm run dev

    47 |
    48 | <script>
  > 49 | import { defineComponent, ref } from 'vue'
       |                           ^^^

Trivial fix is to remove , ref from line 173 of quasar/create-quasar/templates/app/quasar-v2/js-vite-2/BASE/src/layouts/MainLayout.vue and from webpack / MainLayout.vue too.

What did you expect to happen?

Result of npm init quasar@latest should work, npm run dev should not fail.

Reproduction URL

https:// no URL /

How to reproduce?

  1. npm init quasar@latest
  2. select Options API
  3. npm run dev
  4. it fails:
    47 |
    48 | <script>
  > 49 | import { defineComponent, ref } from 'vue'
       |                           ^^^

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

No response

Quasar info output

Relevant log output

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions