question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

<script type=module> support

See original GitHub issue

<script type=module> is supported across all major browsers now, but not in jsdom yet. This can be a tracking issue for the feature.

Node.js doesn’t support modules without flags either, and it’s unclear exactly how much Node support will be compatible with the web. It’s possible to implement support without native support in Node, possibly using projects like https://github.com/standard-things/esm Care would have to be taken to match web behavior and capabilities.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:41
  • Comments:24 (8 by maintainers)

github_iconTop GitHub Comments

10reactions
rogebrdcommented, Oct 7, 2020

Has there been any work on this? Went around debugging an issue for quite some time only to realize the code just wasn’t being executed.

9reactions
cagrosscommented, Jan 4, 2022

I also submit my vote for <type=module> support.

In the meantime, does anyone know of suitable workarounds, i.e. other mock DOM packages that provide such support? It seems like jest-dom does, but I was hoping to use Tape as my testing package rather than Jest.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript modules via script tag | Can I use... Support tables ...
Loading JavaScript module scripts (aka ES6 modules) using <script type="module"> Includes support for the nomodule attribute. Usage % of. all users, all tracked ......
Read more >
JavaScript modules - MDN Web Docs
This guide gives you all you need to get started with JavaScript module syntax.
Read more >
Modules, introduction - The Modern JavaScript Tutorial
As modules support special keywords and features, we must tell the browser ... <!doctype html> <script type="module"> import {sayHi} from '.
Read more >
JavaScript modules: <script type=module>
JavaScript modules allow a program to be divided into multiple sequences of statements and declarations. Each module explicitly identifies ...
Read more >
Using ES Modules in the Browser Today - SitePoint
Safari, Chrome, Firefox and Edge all support the ES6 Modules import syntax. Here's what they look like. <script type="module"> import { tag } ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found