rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Bug]: http import semi-works for Vue

Open tomByrer opened this issue 6 months ago • 2 comments

System Info

System: OS: Windows 11 10.0.22621 CPU: (16) x64 13th Gen Intel(R) Core(TM) i7-13620H Memory: 1.26 GB / 31.63 GB Binaries: Node: 22.13.0 - C:\p\n\nodejs\node.EXE npm: 10.9.2 - C:\p\n\nodejs\npm.CMD bun: 1.2.2 - ~.bun\bin\bun.EXE Browsers: mostly Brave: v1.76.82 Chromium to 134.0.6998.178 Edge: Chromium (128.0.2739.42) Internet Explorer: 11.0.22621.3527

Details

Rspack with http import will load 1 Vue component, but not the other. This issue does not appear when using node_modules.

Works the same on jsDelivr CDN (ESM import) & esm.sh; the main App.vue loads, which imports ./components/HelloWorld.vue as expected. But ./components/TheWelcome.vue does not import/display when http imported, but does work when imported from node_modules.

Tested in Bun & Brave

Reproduce link

https://github.com/tomByrer/test-rspack-httpimports-vue

Reproduce Steps

How I got here:

  1. installed vue expample project via vite
  2. added Rspack via docs' Vite directions
  3. hand-edited ./src/main.js imports

How you can test

  1. download repo
  2. bun i
  3. bun dev
  4. comment/uncomment the first few import lines in ./src/main.js

tomByrer avatar Apr 01 '25 09:04 tomByrer