webpack-cli: [BUG]: Wrong priority in picking config file between .coffee and .js
Bug report
What is the current behavior? Webpack tries to load webpack.config.coffee first when both webpack.config.coffee and webpack.config.js are present. As a result we’ll get a syntax error in case we have no coffeescript dependency installed.
If the current behavior is a bug, please provide the steps to reproduce. Put webpack.config.coffee, configure File Watcher for .coffee file type, get corresponding compiled webpack.config.js, run webpack --mode=production
What is the expected behavior? It should try to load webpack.config.js first (in case if user just compiles his .coffee config into .js and does not want to install additional coffeescript dependency into his project). Only if there’s no .js config file then try to use .coffee.
Other relevant information: webpack version: 4.35.0 Node.js version: 8.11.1 Operating System: Windows 7 Additional tools: JetBrains WebStorm
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (9 by maintainers)
We’re doing that in the old upstream (master), I think problem was that people started beginning to worry about the size of the dependencies we were having. I’m +1 for having interpret still