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

Change index.ejs to index.html #2

Closed
everlose opened this issue Aug 24, 2017 · 1 comment
Closed

Change index.ejs to index.html #2

everlose opened this issue Aug 24, 2017 · 1 comment

Comments

@everlose
Copy link

everlose commented Aug 24, 2017

I just find a plugin for index.html to add dynamic path 'vender.dll.js', comes across this issue: https://github.com/SimenB/add-files-html-webpack-plugin ,no more need ejs at all。

@nicejade
Copy link
Owner

@everlose Sorry, the reply is late. Is really a great idea to use the plugins you recommend . However, according to my observation it also has some limitations;For example, it seems powerless when I want to inject pwa related functionality. Like this:

<% for (var chunk of webpack.chunks) {
  for (var file of chunk.files) {
    if (file.match(/\.(js|css)$/)) { %>
<link rel="<%= chunk.initial ? 'preload' : 'prefetch' %>" href="<%= htmlWebpackPlugin.files.publicPath + file %>" as="<%= file.match(/\.css$/)?'style':'script' %>">
<% }}} %>

Or can also found here:https://github.com/nicejade/vue-boilerplate-template/blob/master/index.ejs#L20-L29, Look forward to more of your views .

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