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

?no-inline is included in asset url #19490

Open
7 tasks done
hi-ogawa opened this issue Feb 22, 2025 · 2 comments · May be fixed by #19496
Open
7 tasks done

?no-inline is included in asset url #19490

hi-ogawa opened this issue Feb 22, 2025 · 2 comments · May be fixed by #19496
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)

Comments

@hi-ogawa
Copy link
Collaborator

Describe the bug

This looks a little unexpected since ?no-inline should work as a special marker and it's more like a shorthand for assetsInlineLimit config.

Reproduction

https://stackblitz.com/edit/vitejs-vite-a5dagvor?file=src%2Fmain.js

Steps to reproduce

  • open stackblitz
  • npm run dev shows /src/test.txt?no-inline
  • npm run build && npm run preview shows /assets/test-iglrS_ky.txt?no-inline

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    vite: 6.2.0-beta.1 => 6.2.0-beta.1

Used Package Manager

npm

Logs

No response

Validations

@OnlyWick
Copy link

This may be intentional behavior.

test('?no-inline svg import', async () => {
expect(await page.textContent('.no-inline-svg')).toMatch(
isBuild
? /\/foo\/bar\/assets\/fragment-[-\w]{8}\.svg\?no-inline/
: '/foo/bar/nested/fragment.svg?no-inline',
)
})

@OnlyWick
Copy link

I think we should keep this flag in the development environment and remove '?no-inline' in the production environment.

@sapphi-red sapphi-red added the p2-edge-case Bug, but has workaround or limited in scope (priority) label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-edge-case Bug, but has workaround or limited in scope (priority)
Projects
None yet
3 participants