Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excluding chunks #13

Open
bhowell2 opened this issue Aug 4, 2018 · 1 comment
Open

Excluding chunks #13

bhowell2 opened this issue Aug 4, 2018 · 1 comment

Comments

@bhowell2
Copy link

bhowell2 commented Aug 4, 2018

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.

@luislobo
Copy link

I think I'm having the same issue. Did you solve it somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants