Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
carvalhoms opened this issue Apr 18, 2024 · 8 comments
Open

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

carvalhoms opened this issue Apr 18, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@carvalhoms
Copy link

Terminal warn:

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

@carvalhoms carvalhoms added the bug Something isn't working label Apr 18, 2024
@jukbot
Copy link

jukbot commented Jun 28, 2024

any update so far ?

@Schllimazll
Copy link

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

@AdrianFahrbach
Copy link

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

@gitFoxCode
Copy link
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

@AdrianFahrbach
Copy link

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

@topwait
Copy link

topwait commented Oct 17, 2024

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

@armenr
Copy link

armenr commented Nov 4, 2024

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

@rowild
Copy link

rowild commented Nov 5, 2024

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;
        }
      }
    ]
  },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants