Don't know if it is a bug or my fault, but I don't know where to get help.
I started a project in spring on the then available mithril 2.0.0-rc.4 version. I finally got around to work on it again and naturally updated to the latest 2.0.4 version.
OS: Manjaro Linux
Browser Firefox and Chromium
In a nutshell: the following example code works fine on mithril-2.0.0-rc.4, of course my project is much bigger:
var m = require("mithril").default;
m.render(document.body, "Hello world");
After upgrading to mithril 2.0.4, this does still build, but does not render anymore, giving the error:
TypeError: m is undefinedapp.js line 416 > eval:3:1
<anonymous> index.js:3
js app.js:416
__webpack_require__ app.js:20
<anonymous> app.js:84
<anonymous> app.js:87
You no longer need the .default in the require.
2.0.0-rc.4 was the last mithril version to ship an ES module build, webpack was using it and that's why .default was required. To fix this issue the ESM build was removed.
We reverted the ESM change in subsequent release candidates as it was
breaking others - use it as you would have in v1, without the .default.
On Thu, Nov 14, 2019 at 15:19 mke21 notifications@github.com wrote:
Assigned #2549 https://github.com/MithrilJS/mithril.js/issues/2549 to
@isiahmeadows https://github.com/isiahmeadows.—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/MithrilJS/mithril.js/issues/2549?email_source=notifications&email_token=ABCGWBCDIZOOXT3E22VD4LLQTWXGTA5CNFSM4JNREB52YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOU3VW3EY#event-2800446867,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABCGWBDM42MDO2FBTEA43B3QTWXGTANCNFSM4JNREB5Q
.>
Isiah Meadows
[email protected]
www.isiahmeadows.com
Thanks, guys, you saved me.
Most helpful comment
Thanks, guys, you saved me.