SimenB / SimenB/add-asset-html-webpack-plugin

the src of script is wrong with html-webpack-plugin v5.3.1

Open
#202 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
336
Forks
42
PR merge metrics
No merged PRs in 30d

Description

1.the config:
plugins:[ new HtmlWebpackPlugin({ template: './src/index.html' }), new webpack.DllReferencePlugin({ manifest: resolve(__dirname, 'dll/manifest.json') }), new AddAssetHtmlWebpackPlugin({ filepath: require.resolve("./dll/jquery.js") }) ]
2.run 'webpack'
success
3.but the inserted script label is wrong

inserted script
<script defer="defer" src="auto/jquery.js"></script>

the src should be 'jquery.js' rather than 'auto/jquery.js'

4.It's may a bug, would you mind give some advice?

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 reproducing the reported webpack build with the plugins and configuration shown, using ./src/index.html, dll/manifest.json, and ./dll/jquery.js. Inspect the generated HTML containing the inserted script and verify that its src is jquery.js rather than auto/jquery.js; no test file is named in the issue.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.