-
Notifications
You must be signed in to change notification settings - Fork 406
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
Move build to rollup, create es module build, add sourcemaps #171
base: master
Are you sure you want to change the base?
Conversation
Nicely done! But there are still a few issues: In the package.json Eslint isn't working anymore. Maybe implementing the rollup-plugin-eslint plugin will fix this. But I haven't used eslint personally, so I can't say much about it. In the rollup wiki it's recommended to still transpile es6 to es5 even when using the module field and only use the module syntax. So I would suggest to add babel to the plugin list of the module version.
|
I made a pull request so it's easier for you. |
Configured babel, fixed package.json, fixed es module build
@timrosskamp so I tried it out, and pre-transpiling to umd actually broke my app's bundle. I merged in your stuff, but I still feel strongly that for such a simple library, distributing straight up es6 is the way to go |
I added another build so authors can have choices:
|
Don't you think thats this gets a bit confusing for the regular user? I've never seen a .nomodule.js bundle in any js libary before, since .min.js is the common naming convention. Many people still copy&paste code from the dist folder and normally search a [libaryname].min.js file to include in their website. Siema is a simple slider, that should work in all major browsers including IE. Forcing every rollup or webpack user to implement and configure a transpiler like babel, because the module bundlers will use the es6 version of the code by default, is in my honest opinion a very bad practice. You either have to manually dive into the package and tell your module bundler to use the pre-transpiled es5 code bundle or you are forced to transpile the code yourself. That just doesn't sound right to me. If I include this slider in my project, I would expect that I just have to The Quote from the rollup github wiki:
|
Hi all. Thanks for a cool discussion here. My take: I agree with @timrosskamp. Siema always have been, still is and will be a simple solution for not experienced users. Tons of users copy minified version of a lib, smash a link in a body and add a few lines of a configuration (exactly like it is presented on promo video). Because it is lightweight and simple solution, more experienced users like it too . Thanks to UMD, we can download it from npm and use via module bundler with ease. I am not a rollup user and I didn't realise that it requires some specific syntax / definition for a file. I will add it of course but in the least destructive way for a current implementation, because it is working well for community. I will find a solution but first I need to find a little bit of time :) Thanks for valuable discussion here guys. One more thing! Next version of Siema (2.0) drops IE 10 (this will reduce the package size by half), goes TypeScript and improves accessibility. Any comments on that? Any additional requests? Thanks and have a nice day y'all 👋 |
I don't have a problem changing I think perhaps @pawelgrzybek you maybe misunderstand my intentions. I DON'T mean that you should require users to use rollup. I DO mean that you should give users many options. The point is to make the lib work for:
|
Closes #159