Skip to content

Excluding chunks #13

Open
Open
@bhowell2

Description

This plugin works fine if you use inject=true for html-webpack-plugin, but it doesn't work great if you want to do anything custom yourself. Here's the most simple example:

<html>
<head>
  <title><%= htmlWebpackPlugin.options.title %></title>
</head>
<body>
<div id="app">
</div>
</body><%
for (var idx in htmlWebpackPlugin.files.js) { %>
    <script src="<%= htmlWebpackPlugin.files.js[idx] %>"></script><%
} %>
</html>

The files js (or you could use ...files.chunks here) still contain all assets, even ones that are excluded on body. Is this truly desired behavior or are there some problems with actually filtering out chunks too?

It's a pretty simple fix and i'll submit a pull request if you think this is desired behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions