jantimon / jantimon/html-webpack-plugin

Embed the script into HTML

Open
#1,831 7 comments 0 reactions 0 assignees View on GitHub
wontfix
Dominant language
JavaScript
Stars
10.7k
Forks
1.3k
Avg merge
1m
Merged PRs (30d)
1

Description

I am trying to embed the JavaScript files into HTML file.

I have very simple example for test purposes

**test.html**
```








```

**script.js**
```
function testfn()
{
alert("hello world");
}
```

I expect, that I provide the HTML file name into Webpack, the webpack will detect the JS file and will generate this output standalone HTML file:
```








function testfn()
{
alert("hello world");
}

```

How to configure webpack to do this (**package.json** and **webpack.config.js** file)? I can not find, how to bundle such simple example.

The input HTML file is not an template. There is working page file.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the requested inputs, test.html, script.js, package.json, and webpack.config.js, then check the plugin's configuration and documentation entry points. Determine whether embedding an existing HTML page and its referenced script is supported or requires a new feature. Done means the requested HTML produces a standalone file with the script embedded and the behavior remains covered by project tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, webpack
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.