-
-
Notifications
You must be signed in to change notification settings - Fork 11
Cannot use m directly, m.default is required #28
Comments
using |
This depends on your bundler setup, and yes we should add some notes about this to the readme. I believe with rollup you enable What bundler are you using? |
Thanks for the info, I'm using webpack 4.8.1, with typescript 2.8.3 and the latest Mithril types. It is a bit confusing, some notes would be much appreciated even though it's not Mithrils fault! |
Closing as this should be addressed in the readme now. |
Hey this is still an issue, even when I follow what's in the Rollup doesn't plan on fixing this, given this issue thread -- neither I did try the default is not exported by node_modules/mithril/mithril.js
1: import * as mithrilProxy from 'mithril';
2: var m = mithrilProxy.default || mithrilProxy;
^
3: // import hack (https://github.com/rollup/rollup/issues/1267#issuecomment-296395734) Right now I'm getting around this by just using mithril's minified version as an external dependency and ignoring rollup's warning [EDIT] - I just decided to switch to ParcelJS -- it works much easier, and supports most of the stuff rollup does now. |
Gives the following errors:
using
m.default('h1', 'Test')
instead works.The text was updated successfully, but these errors were encountered: