About 4,260 results
Open links in new tab
  1. JavaScript modules - JavaScript | MDN - MDN Web Docs

    Nov 3, 2025 · To get modules to work correctly in a browser, you need to make sure that your server is serving them with a Content-Type header that contains a JavaScript MIME type such …

  2. JavaScript Modules - W3Schools

    Modules let you to break up code into separate files. Modules is a fundamental feature in modern JavaScript.

  3. javascript - How to use code from script with type=module ...

    Mar 17, 2018 · Makes it 100% clear that you're adding something into the global namespace (something that var in a traditional non-module script tag doesn't make clear). In a larger …

  4. The type="module" in html file, what's for? - JavaScript ...

    Dec 15, 2021 · You have to use <script type="module"> to include a JS module in your page. Modules are treated differently than regular JS script files by the browser and thus you need to …

  5. Understanding type="module" in JavaScript: A Comprehensive ...

    Jun 5, 2024 · By using type="module" in JavaScript, you can write cleaner, more maintainable, and modular code. Understanding these concepts helps you leverage the full power of ES6 …

  6. Modules, introduction - The Modern JavaScript Tutorial

    Oct 14, 2022 · As modules support special keywords and features, we must tell the browser that a script should be treated as a module, by using the attribute <script type="module">.

  7. TypeScript: Documentation - Modules

    In TypeScript, just as in ECMAScript 2015, any file containing a top-level import or export is considered a module. Conversely, a file without any top-level import or export declarations is …