wollardj / simple-plist

A simple API for interacting with binary and plain text plist data.
MIT License
57 stars 22 forks source link

Dynamic require of "bplist-creator" is not supported with Vite #77

Closed dnicolson closed 1 year ago

dnicolson commented 1 year ago

To reproduce:

  1. npm create vite@latest
  2. Choose Vanilla
  3. Choose TypeScript
  4. Run npm install and npm run dev
  5. Add the following code to main.ts:
    import plist from 'simple-plist';
    console.log(plist)

Version 1.3.1

Uncaught Error: Dynamic require of "bplist-creator" is not supported
    at simple-plist.js?v=110fc26f:7:9
    at index.js:15:44
    at index.js:6:17
    at node_modules/simple-plist/dist/index.js (index.js:12:1)
    at __require2 (simple-plist.js?v=110fc26f:10:50)
    at index.js:41:2

Version 1.4.0

Uncaught TypeError: util.inherits is not a function
    at node_modules/stream-buffers/lib/readable_streambuffer.js (readable_streambuffer.js:136:6)
    at __require (simple-plist.js?v=5edd6120:3:50)
    at node_modules/stream-buffers/lib/streambuffer.js (streambuffer.js:2:39)
    at __require (simple-plist.js?v=5edd6120:3:50)
    at node_modules/bplist-creator/bplistCreator.js (bplistCreator.js:5:21)
    at __require (simple-plist.js?v=5edd6120:3:50)
    at node_modules/simple-plist/dist/index.js (index.js:7:24)
    at __require (simple-plist.js?v=5edd6120:3:50)
    at index.js:26:129