You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm interested in trying to use Web Components in an Elm app created using the awesome create-elm-app project. The guide to Web Components at elmprogramming.com looks very attractive; however, it assumes one will use bower. I'm a total newbie both to Elm and the general JS ecosystem, but Google seems to tell me, that bower is apparently "deprecated", and new JS projects should use webpack+npm (?). I see create-elm-app apparently has support for npm packages; not sure about webpack ones? But regardless, IIUC, the Web Components ecosystem seems to have standardized on bower.
I see there are some guides on how to migrate from bower to webpack, but it's already starting to be too much over my head, when I'm just starting to learn Elm, and don't really know the JS ecosystem either.... :/ Is there some chance you could possibly give some hints on whether one could add some Web Components into a create-elm-app project in some sensible way? Is it possible to add such an entry to the awesome "Usage Guide"? Do you think it can be possible without doing the dreaded "eject"?
@akavel I run into the same issue while using create-elm-app, couldn't find an option other than ejecting and dealing with webpack. There are few things that required to package elm as web component (without need for bower and html imports): you code should be transpiled to ES6, css should be inlined.
Not quite sure about the last point (regarding inlining css), but that's what I ended up doing. If you're interested, here's an example of elm app packaged as web component: https://github.com/1602/json-viewer it might be not 100% right, but it works.
I'm interested in trying to use Web Components in an Elm app created using the awesome create-elm-app project. The guide to Web Components at elmprogramming.com looks very attractive; however, it assumes one will use bower. I'm a total newbie both to Elm and the general JS ecosystem, but Google seems to tell me, that bower is apparently "deprecated", and new JS projects should use webpack+npm (?). I see create-elm-app apparently has support for npm packages; not sure about webpack ones? But regardless, IIUC, the Web Components ecosystem seems to have standardized on bower.
I see there are some guides on how to migrate from bower to webpack, but it's already starting to be too much over my head, when I'm just starting to learn Elm, and don't really know the JS ecosystem either.... :/ Is there some chance you could possibly give some hints on whether one could add some Web Components into a create-elm-app project in some sensible way? Is it possible to add such an entry to the awesome "Usage Guide"? Do you think it can be possible without doing the dreaded "eject"?
Is it maybe related to #176? Can hipertracker/create-elm-app possibly help here somehow?
The text was updated successfully, but these errors were encountered: