The reason this issue is occurring is that adding a dependency to the loader does not guarantee that the loader will be run for the file that was added. The dependencies that are added are only added to the fileDependencies property in the loader, so webpack only cares about them from a watch standpoint.
Dependencies that need to be run by the loader are computed from the output of the acorn compiler. In this case, since there is no actual source code generated from the interface file, the compiler generates no dependencies and doesn't run the loader on the file.
Additionally, I have another branch that fixes the issue in webpack 3 (as that is the version I am currently working in). Would you like me to contribute that change back as well?
…les, including those that produce no javascript
This fix addresses issues mentioned in
The reason this issue is occurring is that adding a dependency to the loader does not guarantee that the loader will be run for the file that was added. The dependencies that are added are only added to the
fileDependencies
property in the loader, so webpack only cares about them from a watch standpoint.Dependencies that need to be run by the loader are computed from the output of the acorn compiler. In this case, since there is no actual source code generated from the interface file, the compiler generates no dependencies and doesn't run the loader on the file.
I have created a sample repository here: https://github.com/bkrupa-argo/atl-interface-webpack4-repro
Additionally, I have another branch that fixes the issue in webpack 3 (as that is the version I am currently working in). Would you like me to contribute that change back as well?