NordicSemiconductor / bluetooth-numbers-database

An up-to-date listing of all the various Bluetooth Specification-related elements that are defined by our industry (Company IDs, Service UUIDs, Characteristic UUIDs and Descriptor UUIDs), that you can use instead of rolling your own.
Other
340 stars 52 forks source link

Dynamic import breaks Webpack.JS #3

Closed baybal closed 4 years ago

baybal commented 4 years ago

Hello,

We have bad news for you: things like require(pathForJson('company_ids')) are breaking a popular module bundler called Webpack.JS

An easy way to work that around is to not to use them. A hard way is there too, and it involves doing a transpilator setup, and a few polyfills easily adding few megs of javascript to setup...

Webpack broke javascript ecosystem? Yes, but what we can do

datenreisender commented 4 years ago

AFAICS the code where dynamic requires are used is currently not intended to be used with a bundler like webpack. So I will close this issue.