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

[Bug]: Can't use unplugin-vue-components/rspack plugin with html-webpack-plugin #4963

Closed
chenjiahan opened this issue Dec 9, 2023 · 3 comments
Assignees
Labels
bug Something isn't working rsbuild rsbuild related team The issue/pr is created by the member of Rspack.

Comments

@chenjiahan
Copy link
Member

System Info

System:
OS: macOS 14.0
CPU: (10) arm64 Apple M1 Pro
Memory: 135.11 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Yarn: 1.22.19 - ~/Library/Application Support/fnm/node-versions/v16.20.1/installation/bin/yarn
npm: 8.19.4 - ~/Library/Application Support/fnm/node-versions/v16.20.1/installation/bin/npm
pnpm: 7.17.1 - ~/Library/Application Support/fnm/node-versions/v16.20.1/installation/bin/pnpm
Browsers:
Chrome: 119.0.6045.199
Safari: 17.0
npmPackages:
@rspack/cli: 0.4.2 => 0.4.2
@rspack/core: 0.4.2 => 0.4.2

Details

Can't use unplugin-vue-components/rspack plugin with html-webpack-plugin:

error[internal]:   Error: Expression expected
  Expected ';', '}' or <eof>
  
  - default_index.ejs:5 Object../node_modules/.pnpm/[email protected][email protected]/node_modules/html-webpack-plugin/lib/load    er.js!./node_modules/.pnpm/[email protected][email protected]/node_modules/html-webpack-plugin/default_index.ejs
    [rspack-repro-unplugin-vue-components]/[[email protected][email protected]]/[html-webpack-plugin]/default_index.ejs:5:7
  
  - default_index.ejs:27 __webpack_require__
    [rspack-repro-unplugin-vue-components]/[[email protected][email protected]]/[html-webpack-plugin]/default_index.ejs:27:36
  
  - default_index.ejs:64 
    [rspack-repro-unplugin-vue-components]/[[email protected][email protected]]/[html-webpack-plugin]/default_index.ejs:64:27
  
  - default_index.ejs:66 
    [rspack-repro-unplugin-vue-components]/[[email protected][email protected]]/[html-webpack-plugin]/default_index.ejs:66:3

If we remove the html-webpack-plugin plugin, it can work.

Reproduce link

https://github.com/chenjiahan/rspack-repro-unplugin-vue-components

Reproduce Steps

  1. pnpm i
  2. pnpm build:rspack
@chenjiahan chenjiahan added bug Something isn't working pending triage The issue/PR is currently untouched. labels Dec 9, 2023
@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Dec 9, 2023
@chenjiahan chenjiahan added the rsbuild rsbuild related label Dec 9, 2023
@bvanjoi
Copy link
Collaborator

bvanjoi commented Dec 13, 2023

related to unjs/unplugin#354

@jerrykingxyz jerrykingxyz removed the pending triage The issue/PR is currently untouched. label Dec 25, 2023
@bvanjoi
Copy link
Collaborator

bvanjoi commented Jan 2, 2024

@rspack/[email protected] + [email protected] + [email protected] + [email protected](overrides) can work well:

image

@chenjiahan
Copy link
Member Author

🎉🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rsbuild rsbuild related team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

No branches or pull requests

3 participants