<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:
- Created 5 years ago
- Reactions:41
- Comments:24 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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.