Created
August 2, 2016 09:15
-
-
Save transitive-bullshit/7346157247a31d562723174c469fb5b4 to your computer and use it in GitHub Desktop.
Webpack + Electron Question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm running into an issues with the latest version of Electron + Webpack. | |
If I try to use the 'electron-renderer' target, webpack compilation fails because it attempts to use native node dependencies from one of my npm modules let's call it "child-module". | |
{ | |
// ... | |
target: 'electron-renderer' | |
} | |
child-module's package.json: | |
{ | |
"dependencies": { | |
... | |
}, | |
"browser": { | |
"zlib": "browserify-zlib", | |
"bluebird": false, | |
"ws": false | |
} | |
} | |
If I change my webpack target to "web", everything works fine as webpack is smart enough to use the browser excludes from child-module's package.json. | |
So, my question is how can I use the proper 'electron-renderer' target while having webpack pick up the correct, browser version of the child-module's dependencies? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment