Coding Shorts: What Surprised Me About ECMAScript Modules

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ธ.ค. 2024

ความคิดเห็น • 10

  • @DannyHille
    @DannyHille 11 หลายเดือนก่อน +1

    Hi Shawn, no need to 'use strict' in modules, all modules are treated as strict by default

    • @swildermuth
      @swildermuth  11 หลายเดือนก่อน

      Exactly right, just forgot to remove it when I made it a module.

  • @BrianHallmanac
    @BrianHallmanac ปีที่แล้ว +1

    Good stuff Shawn. I was just looking at starting an upgrade process of some of our javascript to use ECMAScript modules in a web project. Perfect timing!
    I've been following your content for years. I'm glad I found you on TH-cam! I'll have to restart my Pluralsight subscription to go watch your course now. 🙂

    • @swildermuth
      @swildermuth  ปีที่แล้ว +1

      Awesome. Glad to reconnect!

  • @soneryldrm3075
    @soneryldrm3075 ปีที่แล้ว +1

    Great video, thx.

  • @FlippieCoetser
    @FlippieCoetser ปีที่แล้ว

    ES6 modules works a bit different in browser than node at 6:00 onwards. See importmaps to use NPM modules in browser using bare imports.

  • @collinsk8754
    @collinsk8754 ปีที่แล้ว

    Really interesting! Thanks. Would you need a try-catch block for the asynchronous imports?

    • @swildermuth
      @swildermuth  ปีที่แล้ว +1

      Depends, likely if that fails you can't recover but if you want to catch it and re-try that's possible.