Why isn't json-loader enabled by default?
I'm coming from https://github.com/fb55/entities/pull/26. It's a commonly used tiny library, and the fact that it uses JSON files internally (which is fine with both Node and Browserify) requires anyone using libraries that use libraries that depend on entities add the json loader explicitly to their webpack config. I wonder why JSON files aren't handled correctly by default.
@sokra , could you please explain this design decision? Would you accept a PR changing this?
I can confirm this is annoying. I believe BitcoinJS also uses JSON files, which is why I had to enable it in my project (even though other things such as Browserify seem to support it by default)
@webpack, @sokra any feedback?
https://github.com/webpack/webpack/issues/184#issuecomment-36607967
Seems to me like the reasons @sokra listed in #184 are legit and wont change so this should probably be closed.
seems so, yes.
For the record:
I will not make the json-loader default for three reasons:
- It's not backward-compatible: This means it will break all applications that use json files...
- It would be impossible/difficult/hard to understand to use another loader for json files. I. e. the json5-loader.
- It's weird/hard to understand to make all loaders explicit and only the json-loader is default.