Skip to content

app.config.ts RollupError: [plugin impound] Vue app aliases are not allowed in server runtime. #5029

@kwooshung

Description

@kwooshung

Package

v4.0.0-alpha.2

Description

I found that when I added 'app.config.ts' to the app directory:

import { defineAppConfig } from 'nuxt/app';

export default defineAppConfig({
  toaster: {
    position: 'bottom-right' as const,
    expand: true,
    duration: 5000
  },
  theme: {
    radius: 0.25,
    blackAsPrimary: false
  },
  ui: {
    colors: {
      primary: 'blue',
      neutral: 'slate'
    }
  }
});

The error report is as follows:

Processed 2 collections and 2 files in 85.63ms (2 cached, 0 parsed)                                                                                           @nuxt/content 13:29:20
ℹ Nuxt Icon server bundle mode is set to local                                                                                                                                13:29:21
✔ Vite client built in 341ms                                                                                                                                                  13:29:24
✔ Vite server built in 310ms                                                                                                                                                  13:29:24

 ERROR  RollupError: [plugin impound] Vue app aliases are not allowed in server runtime. [importing #build/nuxt.config.mjs from node_modules/nuxt/dist/app/nuxt.js] 

I copy the file to the same location of the project, I find it difficult to show in popper, docs/app/components/theme - picker/ThemePicker.Vue and ThemePickerButton.vue, how should I make a as well as the official implementation, at the same time the default color is as follows:

Image

I have already asked the ai and consulted relevant materials, and also looked for the project configuration in docs

I found that it seems a bit different from what's on the official website. I don't know if I couldn't find it or if there's none at all.

Expectation

Could you provide a small project case:

  1. The default color is blue and it is not modified at runtime.
  2. Just like the official website, there are so many colors to choose from, and the effect is exactly the same as shown in the screenshot.

Just this simple online case is needed for learning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedv4#4488

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions