@kscript/require

1.0.0 • Public • Published

@kscript/require

在浏览器中使用 commonjs 模块

示例

  <!-- 引入 require -->
  <script src="https://unpkg.com/@kscript/require"></script>
  <script type="module">
    // 注意: 这里的require方法, 是异步的
    const hello = await require('./hello.js')
    console.log(hello)
  </script>

Readme

Keywords

Package Sidebar

Install

npm i @kscript/require

Weekly Downloads

6

Version

1.0.0

License

ISC

Unpacked Size

2.86 kB

Total Files

3

Last publish

Collaborators

  • luren