fast-azure-storage icon indicating copy to clipboard operation
fast-azure-storage copied to clipboard

Bundling with webpack raises error

Open mariosant opened this issue 7 years ago • 0 comments

Bundling this library with webpack raises the following error:

Error: Cannot find module './blob'                                                                                                        
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)                                                           
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)                                                                      
    at Module.require (internal/modules/cjs/loader.js:637:17)                                                                             
    at require (internal/modules/cjs/helpers.js:22:18)                                                                                    
    at Object.get [as Blob] (/node_modules/fast-azure-storage/lib/index.js:17:1)                                                          
    at cache (/src/lib/blob-cache.js:8:1)                                                                                                 
    at Object.<anonymous> (/src/lib/query-maxmind.js:24:1)                                                                                
    at __webpack_require__ (/webpack:bootstrap:19:1)                                                                                      
    at Object.<anonymous> (/src/index.js:4:1)                                                                                             
    at __webpack_require__ (/webpack:bootstrap:19:1)  

The problem lies in the way index lazily exports the modules. I am wondering, is there any reason for this or we could export the modules in the good ol' modules.exports = {...} way?

mariosant avatar Mar 08 '19 10:03 mariosant