Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable es6.mixedImports #91

Open
dev101 opened this issue Oct 16, 2023 · 2 comments
Open

Enable es6.mixedImports #91

dev101 opened this issue Oct 16, 2023 · 2 comments

Comments

@dev101
Copy link

dev101 commented Oct 16, 2023

Any chance to add es6.mixedImports option in the precinct.paperwork call?

I have to use some ES modules via dynamic imports like const aModule = (await import('aModule')).default , and these are not detected by the default precinct config, thus not included in the package.

Also to make it work, it's essential to upgrade precint to some later version, as this es6 stuff doesn't work in precinct@8 (es modules are catched, but their dependencies missing).

@dougmoscrop
Copy link
Owner

yeah seems reasonable.. though to be honest, I don't know why people don't just use esbuild at this point.

@dev101
Copy link
Author

dev101 commented Oct 17, 2023

@dougmoscrop you mean https://github.com/floydspace/serverless-esbuild ?
never heard of it until today.

serverless-plugin-include-dependencies worked just fine for me as I primarily maintain legacy cjs code, until some day some dependencies are only available as es modules.

nevertheless, on your side it's just about adding an option to paperwork and upgrading precint, seems to be backward-compatible and no breaking changes, huh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants