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

Swallows compilation errors from rest of build pipeline #11

Open
akre54 opened this issue Dec 17, 2015 · 1 comment
Open

Swallows compilation errors from rest of build pipeline #11

akre54 opened this issue Dec 17, 2015 · 1 comment

Comments

@akre54
Copy link

akre54 commented Dec 17, 2015

If there's an error in the compilation process somewhere (say a SyntaxError in my JS when piped through babel), IndexHtmlWebpackPlugin will swallow the error and I'll get this TypeError instead:

/Project/node_modules/indexhtml-webpack-plugin/IndexHtmlSource.js:154
                    var chunkJsFile = _.find(chunkForEntry.files, function (file) {
                                                          ^

TypeError: Cannot read property 'files' of undefined
  at Object.<anonymous> (/Project/node_modules/indexhtml-webpack-plugin/IndexHtmlSource.js:154:59)
  at [object Object].exports.each (/Project/node_modules/cheerio/lib/api/traversing.js:293:24)
  at IndexHtmlSource._resolveScripts (/Project/node_modules/indexhtml-webpack-plugin/IndexHtmlSource.js:141:17)
  at IndexHtmlSource.source (/Project/node_modules/indexhtml-webpack-plugin/IndexHtmlSource.js:28:10)
  at CompressionPlugin.<anonymous> (/Project/node_modules/compression-webpack-plugin/index.js:31:25)
  at /Project/node_modules/compression-webpack-plugin/node_modules/async/lib/async.js:111:13
  at Array.forEach (native)
  at _each (/Project/node_modules/compression-webpack-plugin/node_modules/async/lib/async.j
  ...

Commenting out the IndexHtmlPlugin line in my webpack.config.js allows the error to go through correctly.

@yrtimiD
Copy link

yrtimiD commented Jan 13, 2016

In my case error appear if I remove either exclude or files section from tsconfig.json and I use ts-loader

nihey added a commit to nihey/webpack-single-page-boilerplate that referenced this issue Jul 16, 2016
Due to indexhtml-webpack-plugin masking some errors, the previous html-plugin
will be used, until unbroken-dome/indexhtml-webpack-plugin#11
is solved.
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