Support usage without a Bundler
See original GitHub issueI JavaScript bundler like Parcel is recommended by the documentation. In fact not using a bundler leads to some errors.
While using a bundler has many advantages, sometimes it is useful to not having to use a bundler.
- Configuring a bundler add an additional layer.
- A bundler needs to be installed and configured. A bundler can has it own errors.
- Bundled JavaScript is more complicated to debug if everything gets wrapped in a IIFE.
- While bundling files for production, in development, the opposite can be true. Recompling after every change of a file can slow down development.
Over all, having the option to not use a bundler would be nice. A documentation for that would be great.
I guess this takes minimal code changes. If I am not mistaken, ol should not use “bare” imports like
import { easeOut } from './easing';
but import { easeOut } from './easing.js';
. But I do not really know what there is to do to achieve that.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Building without bundling: How to do more with less
When you use a bundler, you're stuck waiting for entire sections of your application to rebuild every time you change just one line...
Read more >Without a Bundler - The `wasm-bindgen` Guide
First let's take a look at the code and see how when we're using --target web we're not actually losing any functionality! use...
Read more >How to Improve the Frontend Dev Experience without a Bundler
A look at how you can use ES6 modules and Service Workers to launch a web app without Webpack or Rollup.
Read more >Building a TODO app without a bundler - DEV Community
In this article I'm going to implement the TodoMVC app without any build tools and only use native JS functions supported by evergreen ......
Read more >Using ES6 Modules without a Transpiler/Bundler step
Only downside is, as of now, they're only support in most recent Chrome 74 ... For ES module features without the use of...
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 FreeTop 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
Top GitHub Comments
Yes indeed. We started out trying to be consistent, but as you point out, there is now lots of inconsistency. I put together #9615 to bring consistency and a linter rule that errors if we don’t include the file extension.
However, “bare” import specifiers still don’t work “out of the box” in browsers. So you cannot do this for example:
And that is how we import 3rd party dependencies in the library.
Thank you for your help. I am not that experienced this JavaScript so bear with me, if I say something stupid.
@tschaub Isn’t this a counter example?
There are some others examples and I think this is one reason, why it is not working that way.
Well, for me for now it is sufficient if my development browser supports it. The generall JS ecosystem on the other hand is of course a different problem.
rbush is an example, that, if I am not mistaken, just fixed that problem with version 3.0.0. rbush 3.0.0 is used now at the openlayers master branch. So there is no problem here (if again I am not mistaken). So, is there any other external library missing?
Yes, I will still use a bundler if my code is ready for production. The reason I am so unhappy with bundling is, that it makes debugging a bit more complicated. If my code runs unbundled than I am sure, it should run bundled or else bundling went wrong.
I know that bundling has been obligatory for years now and you JS developers are very familiar with it. I just think that we are (almost) at a point where bundling is not necessary and if we just go this extra step, we can have some extra benefits.