Fix extensionGlob suffix in webpack/shared.js (#690)
Fix extensionGlob suffix in webpack/shared.js (#690)

* Fix extensionGlob suffix in webpack/shared.js

Prior to this change, the extensionGlob only supported webpacker
configurations that had more than one extension. If there was only
extension configured, the glob generated wouldn't match anything because
it was hardcoded to include a brace expansion [1] which requires at
least two comma-separated strings. So, to fix it, we do not include a
brace expansion if there is only one configured extension.

This change also adds an explicit error message if no extensions are
configured.

[1]: https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html

* Replace numberOfExtensions variable with extensions variable

rossta/webpacker,rossta/webpacker,usertesting/webpacker,rails/webpacker,rails/webpacker,rossta/webpacker,usertesting/webpacker,rossta/webpacker,gauravtiwari/webpacker,gauravtiwari/webpacker,gauravtiwari/webpacker,usertesting/webpacker