I want to create a frontend library. Therefore I want to use webpack. I especially like the css and image loader. However I can only require non-JS files if I am using webpack. Because I am building a library, I cannot garanty that the user of my library will too.
Is there I way to bundle everything into a UMD module to publish it? I tried using multiple entry points, however I cannot require the module then.
import
it? So why "I can only require non-JS files if I am using webpack"? Could you give an example? And about "I tried using multiple entry points" Have you considered the possibility that you don't needwebpack
- onlybabel
will be enough? – Phariseewebpack
orbabel
. I've published this example to Github. Could you check it and tell me is it what you asked about? github.com/UsulPro/libpack – Pharisee