A build that uses ES6 modules
See original GitHub issueWith several module bundlers (webpack 2 and rollup) now supporting tree shaking:
Tree shaking? Normally if you require a module, you import the whole thing. ES2015 lets you just import the bits you need, without mucking around with custom builds. It’s a revolution in how we use libraries in JavaScript, and it’s happening right now.
It would be amazing if there was a turf build using import
. This would drastically reduce the build size (which is now nearing ~500kb with just a handful of features being used).
Issue Analytics
- State:
- Created 8 years ago
- Comments:7
Top Results From Across the Web
A Practical guide to ES6 modules - freeCodeCamp
In this article, we'll create a simple dashboard using ES6 modules, and then present optimization techniques for improving the folder ...
Read more >Using Native, Unbundled ES6 Modules With a Simple Build ...
ES6 modules or ESM) natively in every environment, from development to production. No bundling, code chunking / splitting, or other complicated ...
Read more >How to build, test and release a node module in ES6
How to build, test and release a node module in ES6 · Prerequisites · Create an account on npm · Login to npm...
Read more >A minimalist development workflow using ES6 modules and ...
You can think of Snowpack as a Webpack alternative that uses ES6 modules to simplify and speed up your development workflow. When we...
Read more >JavaScript modules - MDN Web Docs
Importing modules using import maps. Above we saw how a browser can import a module using a module specifier that is either an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m not really convinced on the value of issues anymore: difficult open issues on repositories have a negligible chance of being picked up by passers-by and getting fixed. Is a two-year old issue more useful than no issue at all? Issues that are difficult end up just getting +1ed or “is this fixed” for the duration of time before they either get locked, a maintainer implements them, or they become required in some other way, like if the functionality becomes essential to someone’s project or company, and in that case they’re going to implement the feature issue or not.
I think issues work well for small changes or bug reports, but for large features they’re often counterproductive or a productivity placebo.
Sorry - I’m trying to slim down Turf’s issues to those that are actionable immediately. Right now we have quite a few issues that are very long-term and almost no core maintainer time (i led the vast majority of turf 3 solo), so focusing is a priority. Closing issues does not mean that it’s deprioritizing the request or saying that nobody should do it: I want PRs to be the primary documentation of work rather than issues, and I explicitly will say that a PR is accepted if I close an issue.
Problems here are:
Lodash is able to support ES6 modules mainly because it’s a very… meta project. All of the lodash code is generated dynamically for every single build, and it’s totally different than any other JavaScript project in the whole ecosystem. Going the lodash way would be awesome, but would be a massive change.
Sorry again that closing the issue seemed counterproductive: this is not a “no for everyone”, it’s me trying to define the scope given my estimation of the work’s time requirement versus its benefit and other features, and keeping Turf’s scope to a level that’s accomplishable without further severe burnout.