[FEAT] Add ES Modules support #773
kevinfaveri
started this conversation in
General
Replies: 3 comments
|
For anyone reading this: a workaround, not proper ES Modules support, is using a JSON file as the config file, which will not trigger NodeJS ES Modules restrictions: This will work because commonjs (which maizzle uses) syntax support will try to implicit import JS or JSON files... And if you use a JSON file, Node JS es modules import rules will not apply... |
0 replies
|
Converting this into a discussion for now, as it'll be a while until we can add proper ES modules support, given the state of the ecosystem and the dependencies in Maizzle. Thanks! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Using maizzle version 3.0.0 with its Cli it does not load the config file if the project has "type": "module" specified in the
package.json:Instead rename config.maizzle.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" fromI got this log monkey patching the code.... But the library just returns:
UnhandledPromiseRejectionWarning: Error: could not load 'config.maizzle.js'All reactions