web-infra-dev / rspack

The fast Rust-based web bundler with webpack-compatible API 🦀️
https://rspack.dev
MIT License
9.33k stars 544 forks source link

[Bug]: Rsbuild 使用 unplugin-auto-import 插件报错 #4759

Closed 94ashui closed 9 months ago

94ashui commented 10 months ago

版本信息

System:
    OS: macOS 13.4.1
    CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
    Memory: 1.13 GB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 119.0.6045.159
    Safari: 16.5.2
  npmPackages:
    @rsbuild/core: ^0.1.0 => 0.1.0 
    @rsbuild/plugin-vue: ^0.1.0 => 0.1.0

问题详情

image image

在配置文件中添加配置后 rsbuild dev 报错

复现链接

https://github.com/94ashui/rsbuild-app

复现步骤

  1. pnpm install
  2. pnpm dev
9aoy commented 10 months ago

Also reproducible in original rspack project (use rspack + html-webpack-plugin).

Minimize demo: https://github.com/9aoy/rspack-issue-reproduce/tree/main/rspack-vue

bvanjoi commented 10 months ago

related to https://github.com/unjs/unplugin/pull/354

bvanjoi commented 9 months ago

@rspack/core@0.4.5 + unplugin-auto-import@0.17.3 + vue@3.2.45 + html-webpack-plugin@5.5.7 can work well:

image