rstackjs / rstackjs/html-rspack-plugin

Ported html-rspack-plugin not support output.publicPath with a function

Open
#54 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
19
Forks
4
Avg merge
6h 44m
Merged PRs (30d)
11

Description

Current behaviour 💣

Image

Build program will crash when set output.publicPath as a function.

Expected behBaviour ☀️

Be fine.

Reproduction Example 👾

https://stackblitz.com/github/Gehbt/reprod-rspack-external-html-plugin

reproduct:

run pnpm run build

Environment 🖥

no matter

Additional comments

It is looks like rspack's compilation.getAssetPath not support function at first parameter.

rspack:
Image

webpack:
Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running pnpm run build in the linked reproduction and compare the rspack and webpack behavior for a function-valued output.publicPath. Then inspect the html-rspack-plugin path that calls compilation.getAssetPath; done means the reproduction builds successfully with the function form instead of crashing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.