@ondrejsevcik wrote:
Hi, I’m looking at ember-elm (Elm to JS transpiler) and I’m facing an issue where the compiled code is imported differently in different environments.
The Elm compiler takes all
.elmfiles and outputs one.jsfile. This file is then correctly picked up by broccoli build system. But the problem is how it is glued into the resulting bundle.When imported in
dummyapp, it is wrapped indefinefn.define('dummy/elm-modules', ['export'], function(_export) { // export is defined! });but when imported in
app, it is imported asdefine('app-name/elm-modules', [], function() { // note the missing export })and when imported without
export default ...it doesn’t wrap it indefineat all.I’ve tried to write some hacky wrapper around it to outsmart that, but it’s not working.
What’s the best way to handle this so it works for addons, engines, dummy apps and also regular apps? Plus ideally caching works as well.
Thanks for your help.
Posts: 1
Participants: 1