Thoughts on importing npm modules to the web as JavaScript modules
私はESモジュールについて昨日投稿した投稿を考えています I needed a quick way import a simple module get-urls into my project. The module is well tested and it does what I needed … ignore the fact that it’s pretty easy to implement in a couple of lines of JavaScript. The problem I had is that my project is built in ES6, uses modules and I didn’t want to have to bundle up using CommonJS (require). I couldn’t find a lot of guidance on what to do here, so I went to experiement and this solution is the solution I came across: