Skip to content
This repository has been archived by the owner on Nov 5, 2018. It is now read-only.

Webpack support #289

Closed
abhishiv opened this issue Jul 30, 2015 · 1 comment
Closed

Webpack support #289

abhishiv opened this issue Jul 30, 2015 · 1 comment

Comments

@abhishiv
Copy link

I'm trying to make cloudant/nodejs-cloudant#82 which depends on nano to build via webpack.

There were many errors in the beginning, but I was able to make request etc work by having the following webpack config

    node: {
        console: 'empty',
        fs: 'empty',
        net: 'empty',
        tls: 'empty',
        __filename: true,
        __dirname: true
    }

However the only error left now is the following one, and it comes froms this line

ERROR in ./~/cloudant/~/nano/lib/nano.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../package in /Users/abhishiv/work/gratico/grati.co/node_modules/cloudant/node_modules/nano/lib
 @ ./~/cloudant/~/nano/lib/nano.js 761:15-36

Can you consider replacing it with this

nano.version = require('../package.json').version;

That would allow me to use json-load webpack plugin in order to allow webpack to load it.

Thanks!

@jo jo closed this as completed in c38e92d Aug 3, 2015
@jo
Copy link
Contributor

jo commented Aug 3, 2015

Thank you! Please update the dependency to 6.1.5 which includes your fix.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants