Skip to content

The glob option "as" has been deprecated in favour of "query" #56

Open

Description

@carvalhoms

Terminal warn:

WARN The glob option "as" has been deprecated in favour of "query". Please update as: 'raw' to query: '?raw', import: 'default'.

Activity

  1. added
    bug
    on Apr 18, 2024
  2. jukbot commented on Jun 28, 2024

    @jukbot

    any update so far ?

  3. Schllimazll commented on Jun 28, 2024

    @Schllimazll

    any update so far ?

    Still not, but official nuxt/icon module now support local icons collection as svg files, not only components and also have REAL aspect ratio, not a square. Im migrate to it just today

  4. AdrianFahrbach commented on Sep 16, 2024

    @AdrianFahrbach

    @gitFoxCode Would it help you if we create a PR for this?

  5. gitFoxCode commented on Sep 16, 2024

    @gitFoxCode
    Owner

    @gitFoxCode Would it help you if we create a PR for this?

    Hey, yes, I'll add this PR then to the module, but in general I recommend to use nuxt-icon because it also already supports local icons and it's up-to-date + support by nuxt authors

  6. AdrianFahrbach commented on Sep 16, 2024

    @AdrianFahrbach

    Ok I see. Thank you for your super fast answer!

  7. topwait commented on Oct 17, 2024

    @topwait

    Hello, I see from the source code that the issue has been resolved. Can the author release a version to update it? @gitFoxCode

  8. armenr commented on Nov 4, 2024

    @armenr

    I've been trying to understand where the heck this message has been coming from for AGES. 😂

  9. rowild commented on Nov 5, 2024

    @rowild

    I also can see this warning popping up in the terminal. Any chance to provide an update?

    My current work-around adds thee lines to the muxt.config:

      vite: {
        plugins: [
          {
            name: 'vite-plugin-glob-transform',
            transform(code: string, id: string) {
              if (id.includes('nuxt-icons')) {
                return code.replace(/as:\s*['"]raw['"]/g, 'query: "?raw", import: "default"');
              }
              return code;
            }
          }
        ]
      },
  10. pelayotrives commented on Apr 24, 2025

    @pelayotrives

    This was happening to me when executing the line below. It has to do with the import.meta.glob:

    const articleFiles = import.meta.glob(“../content/articles/*.md”, { eager: true, as: “raw” });

    The error was fixed by changing to:

    const articleFiles = import.meta.glob(“../content/articles/*.md”, { eager: true, query: “?raw”, import: “default” });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions