question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`getOutputFileName` doesn't work with multiple chunks

See original GitHub issue

As-is, the logic in getOutputFileName doesn’t seem to account for grabbing the right “main” output file when multiple chunks are produced, for ex with dynamic imports. In this case, I think you would want R.last here, instead of R.head, since Webpack will generate the main output file after the dynamic chunks:

https://github.com/Izhaki/nodemon-webpack-plugin/blob/master/src/webpack-utils.js#L9

PS. Thanks for a great plugin!!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Izhakicommented, Dec 13, 2017

I’ve updated the README to show example of using script.

Closing this issue - will deal with the issue of hashed multiple entries when someone actually has such an issue.

0reactions
kimnichecommented, Nov 6, 2017

Yeah it’s a tricky one… if it helps at all, originally I was trying to look into other webpack plugins to coerce the ordering of output chunks more deterministically but wasn’t having much luck there

Read more comments on GitHub >

github_iconTop Results From Across the Web

output.filename not working if function · Issue #9007 - GitHub
When I use a function for output.filename it doesn't work for my dynamic imports: they get emitted as 1.js, 2.js etc. with identical...
Read more >
Webpack 5 {output: chunkFilename} not working
In my webpack config, I use single-file entry & the splitChunks option to separate the game code from the libraries I am using....
Read more >
The 100% correct way to split your chunks with Webpack
I'm then returning the name of the package from the path of the module. As a result, we'll get one file for each...
Read more >
15 Common Problems with rmarkdown (and some solutions)
To avoid problems in the first place, I try and do the following: Develop code in chunks and execute the chunks until they...
Read more >
Caching - webpack
This guide focuses on the configuration needed to ensure files produced by webpack compilation can remain cached unless their content has changed. Output...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found