Visitar URL original
Support ES6 modules · Issue #187 · json5/json5 · GitHub
Skip to content

Support ES6 modules #187

Closed
Closed

Description

@xgqfrms

cdn & ES6 import module wanted

<!DOCTYPE html>
<html lang="zh-Hans">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta name="author" content="xgqfrms">
    <meta name="generator" content="VS code">
    <title>JSON5</title>
</head>

<body>
    <section>
        <h1>
            <a href="https://feiqa.xgqfrms.xyz/index.html"></a>
        </h1>
    </section>
    <!-- libs -->
    <!-- <script src="https://unpkg.com/json5@^2.0.0/dist/index.min.js"></script> -->
    <script src="./libs/json5.min.js"></script>
    <script type="module">
        // const JSON5 = require('json5'); 
        import * as JSON5 from "./libs/json5.min.js";
        // JSON5.stringify(value[, replacer[, space]]);
        // JSON5.stringify(value[, options]);
    </script>
</body>

</html>

Activity

  1. changed the title [-]cdn & ES6 import module wanted[/-] [+]Support ES6 modules[/+] on Sep 28, 2018
  2. jordanbtucker commented on Sep 28, 2018

    @jordanbtucker
    Member

    Thanks for reporting this.

    The officially supported CDN is unpkg.com.

    I've added new files at dist/index.mjs and dist/index.min.mjs that support ES6 modules.

  3. xgqfrms commented on Sep 28, 2018

    @xgqfrms
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions