antfu / drauu

Headless SVG-based drawboard in browser.
https://drauu.netlify.app/
MIT License
1.2k stars 64 forks source link

Better support for esm #22

Closed azaleta closed 2 years ago

azaleta commented 2 years ago

Describe the bug

The original issue is here(https://github.com/vueuse/vueuse/issues/2058)

I think export should be added to package.json as something like

  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "require": "./dist/index.js",
      "import": "./dist/index.mjs"
    }
  },

What do you think?

Reproduction

https://stackblitz.com/edit/github-r9jhdg?file=app.vue

System Info

System:
    OS: Windows 10 10.0.19044
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i5-1145G7 @ 2.60GHz
    Memory: 2.59 GB / 15.71 GB
  Binaries:
    Node: 16.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (104.0.1293.54)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

pnpm

Validations

antfu commented 2 years ago

PR welcome :)