Open pro100filipp opened 7 years ago
A PR for this welcome.
Doesn't Stylesheets.elm work as an entrypoint though? As in, it lets you import all the Elm styles you want and bundles them up? I might be misunderstanding your use case though :)
@ahstro hmm, I've caught your point and it will work, but I think it'll result in slightly less effective page load. Say, I have two entry points admin
and app
for my two Elm modules Admin
and App
. If I use one Stylesheet.elm
importing styles from my modules and then require
it in index.js
I'll end up using admin
styles in app
– which I don't want to, because then large part of css becomes unused and could be cut off for faster page load. But nevertheless, thank you for your suggestion, I was looking for solution in this direction and your comment helped to find it out)
@tcoopman unfortunately a PR isn't enough – there is already a PR from @lukewestby for module option support, but there's also a problem with elm-css itself (only for nested modules which is my case).
As I a temporary workaround I forked elm-css and elm-css-webpack-loader, merged necessary commits and changed my package.json
.
Problem: You have to create one webpack rule per outputted css.
Hello! As I understand loader now supports only single entry with
Stylesheets.elm
in the project root directory. If I want to have at least two entries in mywebpack.conf
I must specify two differentStylesheets.elm
files, but it's not possible at the moment. So, do you have plans on supporting customising stylesheets filename and location?