electron-store: doesn't work with webpack
If I require this module in webpack, it will break webpack because of this line
const parentDir = path.dirname(module.parent.filename);
Is there any way to make it work webpack, maybe refer to the global.module instead of just module?
I’m using:
- electron-config: 0.2.1
- electron: 1.4.1
- webpack: 1.13.2
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (2 by maintainers)
@jaxgeller @jamesmacfie8i this works perfectly -
It’s the inverse: Webpack doesn’t work with this module. Open an issue on the Webpack repo.
solutions above didn’t work for me, but I did this:
externals: [{ 'electron-config': 'require("electron-config")' }]
I didn’t have to add anything else, if it’s useful here’s my webpack.config.js (I’m my project I’m using vue.js):