Nested `Elm` variable when using webpack2
See original GitHub issueI tried to reproduce this with the included webpack2 example but I couldn’t get that one running.
The issue is that using webpack2 seems to nest the Elm
javascript variable.
Example (working code):
var Elm = require('./Main')
Elm.Elm.Main.init({node: document.getElementById('main')});
Found this while upgrading elm-select here
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Issues · elm-community/elm-webpack-loader - GitHub
Contribute to elm-community/elm-webpack-loader development by creating an account on GitHub. ... Nested Elm variable when using webpack2.
Read more >elm-webpack-loader - Bountysource
The issue is that using webpack2 seems to nest the Elm javascript variable. Example (working code): var Elm = require('./Main') Elm.Elm.Main.init({node: ...
Read more >Configuring an Elm App with Environment Variables via ...
So the first step is to get webpack to pick up the config we need from the environment. We'll use the dotenv npm...
Read more >Elm FAQ
Which special type variables are there, and how do they work? How can I change the value of a field in a record?...
Read more >Learn - Elm Discourse
Topic Replies Views Activity
Extensible ECS data structure 23 602 April 19, 2021
Nice way to pass no data through port? 2 408 April 18,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For those of us using es6 modules, this did the trick for me:
As noted above, you can also do this:
This also worked for me, using webpack 5 with Typescript and Elm 0.19.1