I have included only
<script src="<?php echo get_stylesheet_directory_uri() . '/js/anime.min.js';?>"></script>
<script src="<?php echo get_stylesheet_directory_uri() . '/js/cash.js';?>"></script>
<script src="<?php echo get_stylesheet_directory_uri() . '/js/collapsible.js';?>"></script>
In my pages, as I don't want all the components of Materialize for this website.
Notes in anime.min.js say that M was removed, however, I get the error message
Uncaught ReferenceError: M is not defined
at anime.min.js:11
at anime.min.js:11
collapsible.js:267 Uncaught ReferenceError: anime is not defined
at collapsible.js:267
Is this my own misunderstanding, or an error?
You cannot use individual files alone. Currently there is no way to import partial components.
Oh. Well, darn. I assumed that was the point of breaking up the plugins into different pieces. I should just be able to use materialize.js with that to make it work though, correct?
Yes
I know this was closed. But I'm using 1.0.0-beta and seeing the same error after I added Sidenav to my page.
The only difference is I imported the full js via webpack.
Please advise in how to get rid of this error. It's preventing my Sidenav from working.
oh, why this nice framework miss the great feature - importing selected modules .. ?
Most helpful comment
I know this was closed. But I'm using 1.0.0-beta and seeing the same error after I added Sidenav to my page.
The only difference is I imported the full js via webpack.
Please advise in how to get rid of this error. It's preventing my Sidenav from working.