-
Notifications
You must be signed in to change notification settings - Fork 5
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
this.namedChunks[source] undefined #8
Comments
@ylg Can you please post your full webpack config? |
I just got this when I had the path to my index.html wrong in the entry section. I guess the plugin gets invoked even in this invalid state and doesn't handle it too well. |
Here's the webpack.config.js stripped way down (still has same error):
Note I've tried a few million variations on index.html ./index.html ./src/index.html ../going-insane/index.html and so forth. |
[email protected] |
are you sure that "./src/index.html" path is correct? my environment is the same, but using node v4.1.2 |
Thanks. Yes, I'm afraid ./src/index.html is correct. I've also tried moving index.html to the project's root and just using './index.html' and using the context option to set 'src', and just about every other pathing thing right and seemingly wrong I can think of. I just bumped to Node 4.2.0 and see the same symptom. |
Ok. If you can provide a sample in a repository i'd be happy to have a look for you. |
@ylg I had the same problem, and it went away when I added the loader like this:
However I got a different error after fixing this:
I tracked the issue down and it looks like the following code in IndexHtmlSource.js is not able to find the ExtractTextPlugin:
|
I was able to fix this by installing the 'html-loader' package: npm install --save-dev html-loader It'd be great if indexhtml-webpack-plugin gave a better error in this case. I found the solution by dumping 'this' inside the callback and seeing an error stored on 'this' with the real problem. |
There's a complete demo of using indexhtml-webpack-plugin at: |
First attempt at using indexhtml-webpack-plugin and am always seeing this error:
I'm not familiar with the workings of plugins, I would have guessed that this:
and this
need to match for that bit of code to work, but apparently that's not what is missing here. Thoughts?
The text was updated successfully, but these errors were encountered: