compiler
compiler copied to clipboard
The compiler should not include non-Elm resources from the src/ folder
Quick Summary: When publishing a package, the compiler will bundle all the files in src/, even if they're not relevant to the compilation.
SSCCE
As explained in https://github.com/ryannhg/elm-spa/issues/132, ryanhhg/elm-spa as of 6.0.4 suffers from this problem.
- Elm: 0.19.1
- Browser: NA
- Operating System: Linux Ubuntu
Additional Details
This problem bloats the ELM_HOME unnecessarily and increases download times.
Thankfully, as of now, I can't figure a way that this can lead to people executing arbitrary JavaScript code.
Possible solution exploration
I don't know how the packaging works exactly, but I imagine that the solution includes changing the predicate in writeEntry so that it recurses over directories and includes only .elm files (and *.js files for elm/elm-explorations).
Thanks for reporting this! To set expectations:
- Issues are reviewed in batches, so it can take some time to get a response.
- Ask questions in a community forum. You will get an answer quicker that way!
- If you experience something similar, open a new issue. We like duplicates.
Finally, please be patient with the core team. They are trying their best with limited resources.