vitejs / vite

Next generation frontend tooling. It's fast!
http://vitejs.dev
MIT License
67.24k stars 6.05k forks source link

[Bug Report] 5.3.2 dynamic css import could not resolve "./index-XXX.js" #17597

Closed rpiechowicz closed 2 months ago

rpiechowicz commented 2 months ago

Describe the bug

Loading dynamic styles into a bundle creates weird imports in the application head file. When loading the bundle in an external application it causes an import("./index-XXX.js") error on version 5.2.11 everything worked.

How to deal with the error? Or what i have to do to fix it?

components-ui lib

image

components-ui js

image

using lib in app

Zrzut ekranu 2024-07-1 o 18 27 18

Reproduction

no rep

Steps to reproduce

No response

System Info

System:
    OS: macOS 14.5
    CPU: (11) arm64 Apple M3 Pro
    Memory: 148.52 MB / 18.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.14.0 - /usr/local/bin/node
    npm: 10.8.1 - /usr/local/bin/npm
    pnpm: 9.4.0 - ~/Library/pnpm/pnpm
  Browsers:
    Safari: 17.5

Used Package Manager

pnpm

Logs

No response

Validations

bluwy commented 2 months ago

Duplicate of https://github.com/vitejs/vite/issues/17548. We'll fix this in the next patch release