• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

ES6 notation

Scheduled Pinned Locked Moved Development
7 Posts 3 Posters 953 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    mumblebaj Module Developer @sdetweil
    last edited by Sep 7, 2022, 6:03 PM

    @sdetweil Thanks Sam. Is there any plan that it would one day be possible? Certain helper modules, newer versions that is, only supports ES6 notation. If we don’t move along with the times then we may get stuck in the “dark ages” so to say.

    Older versions have security vulnerabilities etc.

    Check out my modules at: https://github.com/mumblebaj?tab=repositories

    S 1 Reply Last reply Sep 7, 2022, 7:19 PM Reply Quote 0
    • M Offline
      MMRIZE @mumblebaj
      last edited by Sep 7, 2022, 7:08 PM

      @mumblebaj
      You can use “import()”, but need some tricks.

      • wait enough time to finish importing
      • or use promise to confirm loading finishes.

      I used that trick in my MMM-Scenes module to import modular mjs instead of global injections.

      1 Reply Last reply Reply Quote 1
      • S Online
        sdetweil @mumblebaj
        last edited by Sep 7, 2022, 7:19 PM

        @mumblebaj i am not in the loop on the plans for future MM designs, details…

        best to open an issue and ask Mich

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • M Offline
          MMRIZE @mumblebaj
          last edited by MMRIZE Sep 7, 2022, 7:27 PM Sep 7, 2022, 7:24 PM

          @mumblebaj
          Ref this; https://forum.magicmirror.builders/topic/15761/best-practice-for-import-esm-in-mm-module?_=1662569185624

          It was for front mm module, but you can apply in the node_helper also. (Easier, because you don’t need to wait dom creation to inject script in node_helper, just do finish importing confirmation before first work begins in your start() method, or at least before using that module.)

          M 1 Reply Last reply Sep 7, 2022, 7:30 PM Reply Quote 0
          • M Offline
            mumblebaj Module Developer @MMRIZE
            last edited by Sep 7, 2022, 7:30 PM

            @MMRIZE and @sdetweil Thanks guys, Thought I would put the question out there and see what crawls out the woodwork. ;-)

            Check out my modules at: https://github.com/mumblebaj?tab=repositories

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              7/7
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy