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

after updating to html-webpack-plugin@4.0.0-alpha, it turns to undefined #132

Closed
edwardfxiao opened this issue Aug 8, 2018 · 7 comments
Closed

Comments

@edwardfxiao
Copy link

config.plugins.push(
  new AddAssetHtmlPlugin([
    {
      hash: true,
      filepath: require.resolve(PATH.SOURCE_PATH + '/js/vendor/fabric.min.js'),
      includeSourcemap: false
    }
  ]
)

html-webpack-plugin@3.0.6

<script type="text/javascript" src="/fabric.min.js?bf4b231c259745703b2b">

html-webpack-plugin@4.0.0-alpha

<script type="text/javascript" src="undefined">
@SimenB
Copy link
Owner

SimenB commented Sep 16, 2018

🎉 This issue has been resolved in version 3.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@edwardfxiao
Copy link
Author

edwardfxiao commented Sep 17, 2018

I'm sorry, but when it still got undefined

 "devDependencies": {
    "add-asset-html-webpack-plugin": "^3.0.1",
    "html-webpack-plugin": "^4.0.0-alpha"
}
config.plugins.push(
  new AddAssetHtmlPlugin([
    {
      hash: true,
      filepath: require.resolve(PATH.SOURCE_PATH + '/js/vendor/fabric.min.js'),
      includeSourcemap: false
    },
    {
      hash: true,
      filepath: require.resolve(PATH.ASSET_PATH + '/vendor.js'),
      includeSourcemap: false
    },
    {
      hash: true,
      filepath: require.resolve(PATH.ASSET_PATH + '/config.js'),
      includeSourcemap: false
    }
  ])
);

still got undefined
image

@SimenB
Copy link
Owner

SimenB commented Sep 17, 2018

That's odd, it works in the example in this repo. Can you create a reproduction example?

@SimenB
Copy link
Owner

SimenB commented Sep 17, 2018

I've just tested with alpha-2, maybe you're on an old one?

@edwardfxiao
Copy link
Author

oh, there is an alpha-2 version of html-webpack-plugin?

@edwardfxiao
Copy link
Author

Thanks man, it worked with "html-webpack-plugin": "^4.0.0-alpha.2", but not with "html-webpack-plugin": "^4.0.0-alpha"

@SimenB
Copy link
Owner

SimenB commented Sep 17, 2018

Ah, sorry about that! Awesome that it worked out, though 🙂

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

No branches or pull requests

2 participants