-
Notifications
You must be signed in to change notification settings - Fork 139
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
Differentiate css and js for template in chunks #69
Comments
Same for me, need information. |
I'm not sure that I know what is going on here. Please offer me some code or something more concrete about the problem you're having. As I understand it, webpack is producing js files by default. These chunks will show up here, as you've mentioned: https://github.com/jaketrent/html-webpack-template/blob/master/index.ejs#L104 If you're producing .css files, you're probably using ExtractTextPlugin or something like that and then will get css files here, right?: https://github.com/jaketrent/html-webpack-template/blob/master/index.ejs#L48 |
You can use
or use
and
|
on using this below all the chunks including css are also added as script html tag element rather than css tag element. how to add css with link tag and js with script tag using chunks.
<% for (var chunk in htmlWebpackPlugin.files.chunks) { %>
<script src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script><% } %>
Also tried using below , but this include the css as well.
<% for (var chunk in htmlWebpackPlugin.files.js) { %>
<script src="<%= htmlWebpackPlugin.files.js[chunk]%>"></script><% } %>
The text was updated successfully, but these errors were encountered: