Answer the question
In order to leave comments, you need to log in
How to build a js library that can be connected via a script tag to HTML?
I made a library and published it to npm. The source code is written in ES6 and divided into modules.
Through npm install, everything works great if you collect via weback in a bundle, etc.
How to properly build cdn ready version of the library?
Answer the question
In order to leave comments, you need to log in
npm install rollup --save-dev.
boilerplate for libraries
Or webpack .
https://webpack.js.org/guides/author-libraries/
+
For es6 -> es5 distillation
https://github.com/TypeStrong/ts-loader but you can also use babel
+
For polyfills
https://github. com/SebastianS90/webpack-polyfill-i...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question