-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doesn't work with webpack #3
Comments
It's the inverse: Webpack doesn't work with this module. Open an issue on the Webpack repo. |
@steambap Not sure if the fix I used will work for you, but adding this into your webpack.config may help: externals: [{
'electron-config': 'electron-config'
}] |
Sorry to comment after being closed. Adding the externals like above and |
solutions above didn't work for me, but I did this:
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):
|
@jaxgeller @jamesmacfie8i this works perfectly - module.exports = {
target: 'node',
externals: [{
'electron-config': 'electron-config'
}],
output: {
libraryTarget : 'commonjs2'
}
}; |
Hey @danielnieto was there a particular issue you were trying to solve why you have all those other externals? I tried it but now I get
|
Hey @jamesmacfie8i I tried #3 (comment) but now I get Also tried #3 (comment) but now I get |
Hey @steambap did you get #3 (comment) solved? |
@komplexb When I exclude this module in the webpack config I also get the issue with electron cannot be found. Did you get this working? |
@safinn I think this is what I did: https://github.com/komplexb/notifyer-electron/blob/master/config.js#L25 |
For people who come here, you have to add |
@sallar would you please list exactly the steps you need to take to make this lib working with webpack? |
@nicolabortignon In your webpack config: module.exports = {
...
externals: ['conf']
}; |
@sallar sorry, but not 100% sure here. I'm using this boilerplate: https://github.com/chentsulin/electron-react-boilerplate And in this file: https://github.com/chentsulin/electron-react-boilerplate/blob/master/webpack.config.base.js at line 10, I did replace with: This doesn't work. Any idea why? |
|
I got this working by adding @nicolabortignon Using the boilerplate you can change: |
same problem, nothing works, why can't this work with webpack? |
@sgehrman are you sure you're using the right package name? If you did a recent install then the above package names should be renamed to
|
Please show your frustration on the webpack issue tracker: webpack/webpack#196 |
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:
The text was updated successfully, but these errors were encountered: