chore: add support for both cjs and esm builds#41
chore: add support for both cjs and esm builds#41bleadof wants to merge 1 commit intofinal-form:masterfrom
Conversation
- add .node-version file - use cjs for nps script - add the installed plugins to the eslint config - add both esm and cjs builds - My next.js project that still uses babel doesn't build without this
fbab5b3 to
19c20dd
Compare
|
@erikras Any change for a review? |
| const { series, rimraf } = npsUtils | ||
|
|
||
| export default { | ||
| const nps = (script) => `nps -c ./package-scripts.cjs ${script}` |
There was a problem hiding this comment.
I don't see this in the documentation of nps-utils nor in main final-form repository.
I think it would be a good idea to have consistency for tooling across final-form repositories.
| "version": "2.0.0", | ||
| "description": "Decorator that will attempt to apply focus to the first field with an error upon an attempted form submission in 🏁 Final Form", | ||
| "main": "dist/final-form-focus.cjs.js", | ||
| "main": "dist/final-form-focus.cjs", |
There was a problem hiding this comment.
I don't get why it's necessary
(not consistent with other libs)
|
Thanks for adding dual CJS/ESM support! 🙌 This is valuable for compatibility. What this adds: Note: PR #42 (by @iamdey) also modifies package.json to add TypeScript type definitions. Both PRs are valuable but will need coordination:
Concerns: Recommendation: My suggestion: Merge #42 first (simpler, just adds types), then rebase #41 to incorporate both changes. |
Ah, I was trying to use it in my project and was unable to do so, so hence the PR. |
I confirm v2 is broken: no issues at all with v1 |
Uh oh!
There was an error while loading. Please reload this page.