Open BehindTheMath opened 5 years ago
I'm not convinced of the practicality of this. Bundlers usually don't compile files in node_modules
. It does seem obvious to me that we should provide a pure ES6 output but in my experience when I was setting up the bundling, it wasn't easy to work with in that state.
Bundlers usually don't compile files in node_modules.
I'm not sure what you mean by that. The whole point of a bundler is to bundle your code along with the libraries you depend on, into a single file.
So, besides publishing an ES6 bundle, we can also publish the transpiled ES6 sources, and that way any user that is also using a bundler won't have it bundled twice.
Also, unless Rollup has a way to bundle the type declaration files as well, we need to publish the unbundled ES6 sources along with the type files.
@rtheunissen What are your thoughts about this?
I think that is the attempt behind the vue-mc.es.js
file that is generated, which corresponds to the module
entry in the package.json. I'm not a pro with Javascript bundlers though so will take a look around to see how other projects are doing this.
Many users use Webpack or another bundler to bundle this library with their code. For such a use case, there's no need for them to have this library already bundled.