jharris4 / html-webpack-tags-plugin

lets you define html tags to inject with html-webpack-plugin
MIT License
255 stars 31 forks source link

AssertionError [ERR_ASSERTION]: object glob found no files #48

Closed jayryemure closed 5 years ago

jayryemure commented 5 years ago

The issue I'm facing is that this assertion seems to happen immediately on compiler execution before I have a chance to generate the files that it's asserting. The files in question are css files with content hashes so they're dynamically created during webpack compilation.

https://github.com/jharris4/html-webpack-tags-plugin/blob/7e2f1b3dfd9dbb62294f6fc1a00c4f5ce4741dc4/index.js#L150

Is it tenable to alter that assertion so that it only happens when the glob is first needed or can be configured to be optional?

"html-webpack-plugin": "3.2.0", "html-webpack-tags-plugin": "2.0.13", "webpack": "4.33.0", "webpack-cli": "3.3.5"

jharris4 commented 5 years ago

Interesting... I had designed the glob feature to allow the inclusion of static assets that exist before webpack even starts running.

I think I understand your use though, so there might be a middle ground that can be found fairly easily, where the check for the glob assets existence gets deferred a little.

jharris4 commented 5 years ago

Usually html-webpack-plugin takes care of adding js/css files that are generated by webpack itself, so I'm a little surprised that you've found a case where that is not happening.

Any chance you can share a complete webpack config so I can dig a little deeper?

jharris4 commented 5 years ago

@jayryemure I'm still waiting for more details about your webpack config to see if I can dig into this further.

If I don't hear back soon I'll assume I can close the issue. Thanks!

jharris4 commented 5 years ago

Closing for lack of activity