Open jehon opened 3 years ago
Right now, platform.js is a written with CommonJS, so there might not be much benefits in terms of just providing a ESM version, although I might look into that in the future. An ESM version also isn't likely to improve tree-shaking.
Angular warns users about commonjs packages and says that it could lead to optimization bailouts.
It would be nice to have platformjs as es6 module. E.g. you could convert the project to a Typescript project and build it with rollup.js. After that you get a commonjs ( and a minified version) and a es6 module automatically. @bnjmnt4n please have a look on my tsrollupjs-sample project. It's very easy to migrate and Typescript is easy to learn.
ESM version would be beneficial for svelte users, otherwise this library can't be used there.
Are there any updates on this? I wanted to use this for a react project in my team and not having an esm version makes it difficult.
Nodejs and the browser now fully support the "import ... / export ... " syntax.
Will this package be migrated to?