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

Cannot read property 'headTags' of undefined #1284

Closed
hackteck opened this issue Oct 7, 2019 · 3 comments
Closed

Cannot read property 'headTags' of undefined #1284

hackteck opened this issue Oct 7, 2019 · 3 comments

Comments

@hackteck
Copy link

hackteck commented Oct 7, 2019

<%= htmlWebpackPlugin.tags.headTags %> broken.
I figure this out with
<%= htmlWebpackPlugin.files.js.map(src => `<script type="text/javascript" src="${src}"></script>`).join("\r\n ") %>

@scottbedard
Copy link

@hackteck It looks like this feature is only available in the 4.0 beta versions. Judging by this, the property should be available

html-webpack-plugin/index.js

Lines 998 to 1002 in bf017f3

htmlWebpackPlugin: {
tags: assetTags,
files: assets,
options: options
}

I ran into this problem because vue-cli is relying on 3.2, which doesn't appear to have the property

htmlWebpackPlugin: {
files: assets,
options: options
}

Does anyone know if it is possible to access these prepared tags in 3.2? I looked for them using the templateParameters function, but so far no luck.

@mecampbellsoup
Copy link

mecampbellsoup commented Mar 11, 2020

@scottbedard just yarn upgrade html-webpack-plugin@^4.0.0 ?

@jantimon
Copy link
Owner

as @mecampbellsoup said this is unfortunately only part of the beta:

https://www.npmjs.com/package/html-webpack-plugin/v/4.0.0-beta.11

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants