electron-userland / electron-userland/electron-webpack

Weird error after updating to 1.6.1 from 1.5.0

Open
#35 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
902
Forks
168
PR merge metrics
No merged PRs in 30d

Description

I'm using element-ui and after updating from 1.5.0 to 1.6.1 things started breaking and I cannot `yarn dev` anymore. Not just element-ui, things are breaking on electron-vue boilerplate side too - static images are throwing a 404 in dev mode (and not after building). I've not changed anything else other than updating this package. I've downgraded back and the error seems to go away. This is the error I'm getting:

```
ERROR in ./src/renderer/main.js
Module not found: Error: Can't resolve 'antd/lib' in '~/src/renderer'
@ ./src/renderer/main.js 276:0-32
@ multi (webpack)-dev-server/client?http://localhost:9080 webpack/hot/dev-server ./node_modules/electron-webpack/vue-renderer-entry.js ./src/renderer/main.js
```

I'm not sure why suddenly it requires `antd/lib` module where it was working fine before. Things I've done to try to fix it:

* Whitelisting element-ui:
```
"electronWebpack": {
"whiteListedModules": ["element-ui"],
},

```
* Referencing image as:
=> this doesn't load in dev build but does in production

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.