georgedoescode / generative-utils

A collection of handy generative art utilities
MIT License
289 stars 22 forks source link

Fail on compilation in Nuxt #2

Open timothee-durand opened 2 years ago

timothee-durand commented 2 years ago

Hello,

To begin thanks for your work !

I've one problem with this package. When I try to use it with Nuxt I've some compilation errors. OS : windows 11 Nuxt : 2.15 In the terminal :

 ERROR  in ./node_modules/@georgedoescode/generative-utils/dist/index.js                                                      friendly-errors 21:00:32  

Module parse failed: Unexpected token (1:6477)                                                                                friendly-errors 21:00:32  
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> var Ji=Object.create;var on=Object.defineProperty;var to=Object.getOwnPropertyDescriptor;var eo=Object.getOwnPropertyNames;var no=Object.getPrototypeO
f,ro=Object.prototype.hasOwnProperty;var io=t=>on(t,"__esModule",{value:!0});var U=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var oo= ...

(and all the file directly in the terminal)

And in the browser :

SyntaxError
Unexpected token 'export'

If you can help me I'll be glad to give more informations ! Thanks by advance !

malwayson commented 2 years ago

Same issue in NextJs as well. I have tried changing the vertion but facing the same issue

georgedoescode commented 6 months ago

Hey, sorry to hear about this. It's been a while since I have looked at this library, so a couple of issues fell by the wayside.

I am currently rewriting the library from the ground up, with much better bundling than before. I'm sure this will fix this issue.

In the meantime, I honestly don't plan to make any updates to the existing version. I think the best bet would be to pull the functions you need directly from the repository. Cheers!