Closed ricardobrandao closed 6 years ago
Do you think this is an issue with Webpack or an issue with my boilerplate?
I believe it has to do how Webpack works. I've opened an issue with them.
Haven't you encountered this behaviour yet? If so, how did you handle it?
I believe the problem is you're adding moment
to your webpack entry
option, which I don't think is needed. When I remove that from your example, it works fine for me.
Hi @philipwalton,
This setup is great, thanks for sharing it.
I would like to use this in my build, but I'm having trouble with external dependencies.
I've included momentjs, and I'm importing it inside
import-1.js
which will be part of an async chunk:Furthermore, I'm adding momentjs as a new entry and extracting it as a vendor dependency to its own file, using the CommonChunksPlugin configuration in
bundles.js
:When I run the website momentjs is not being loaded and webpack throws the following error:
I've created a Pull Request with this example so please feel free to check it out.