LearnNewsExamplesServices
Frontmatter
id523
titleHtmlWebpackPlugin: include main chunk
stateClosed
labels
bughelp wanted
assigneestobiu
createdAtMay 1, 2020, 2:52 PM
updatedAtMay 1, 2020, 6:06 PM
githubUrlhttps://github.com/neomjs/neo/issues/523
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 1, 2020, 6:06 PM

HtmlWebpackPlugin: include main chunk

tobiu
tobiu commented on May 1, 2020, 2:52 PM

This worked perfectly fine before separating the main thread build from the workers.

Example:

new HtmlWebpackPlugin({
    chunks  : ['main'],
    // ...
});

The index files need to get created in the examples or app build scripts.

These scripts are no longer aware of the main thread chunk.

I see 2 options:

  1. Manually adding the main chunk into each index file (adjusting the templates => index.ejs)
  2. Evaluating where webpack stores the chunk name to file mappings and manually dropping main in there (has to happen after the builds are done).
tobiu added the bug label on May 1, 2020, 2:52 PM
tobiu added the help wanted label on May 1, 2020, 2:52 PM
tobiu cross-referenced by #10630 on May 1, 2020, 3:08 PM
tobiu referenced in commit 19fb457 - "#523 in progress" on May 1, 2020, 6:02 PM
tobiu referenced in commit dc42ade - "#523 adjusted the prod build" on May 1, 2020, 6:05 PM
tobiu
tobiu May 1, 2020, 6:06 PM

went for:

plugins.push(new HtmlWebpackPlugin({
    chunks  : [],
tobiu assigned to @tobiu on May 1, 2020, 6:06 PM
tobiu closed this issue on May 1, 2020, 6:06 PM