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

Release as modern code #12

Open
fregante opened this issue Jul 28, 2022 · 1 comment
Open

Release as modern code #12

fregante opened this issue Jul 28, 2022 · 1 comment

Comments

@fregante
Copy link
Contributor

fregante commented Jul 28, 2022

It's 2022 and most users no longer need babel. Those who do probably already have a setup to transpile node_modules to their specific needs. What do you think about releasing a new breaking version dropping babel? There's a lot of unnecessary/slow code here:

https://unpkg.com/browse/[email protected]/dist/dom-form-serializer.mjs

It would be a good time to also include an exports map (which is also a breaking change) as described in https://www.typescriptlang.org/docs/handbook/esm-node.html#packagejson-exports-imports-and-self-referencing

{
    "name": "dom-form-serializer",
    "type": "module",
    "exports": {
        ".": {
            // Entry-point for `import "my-package"` in ESM
            "import": "./dist/dom-form-serializer.js",
            // Entry-point for `require("my-package") in CJS
            "require": "./dist/dom-form-serializer.cjs",
            // Types from https://github.com/jefersondaniel/dom-form-serializer/issues/11
            "types": "./dist/dom-form-serializer.d.ts",
        },
    },
    // CJS fall-back for older versions of Node.js
    "main": "./dist/dom-form-serializer.cjs",
}
@jefersondaniel
Copy link
Owner

My focus on this library was to make something slim, so I'm OK with launching a new major version dropping babel support. I'm very busy these days but I'm open to PRs.

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