Skip to content

Bundling with webpack raises error #37

@mariosant

Description

@mariosant

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions