electron-userland / electron-userland/electron-webpack
Uncaught ReferenceError: vendor is not defined when using dll
- Dominant language
- TypeScript
- Stars
- 902
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
As per your suggestion, I'm using dll to improve the build time but I get Uncaught ReferenceError: vendor is not defined error every time. With my experience with `Laravel Mix` I understand that I need to load the generated `vendor.js` file in dist/render-dll directoy but couldn't figure out how. I thought that this was automated and gets injected by electron-webpack.
I'm using electron-vue and my package.json looks something like this:
```json
...
"files": [
"dist/electron/**/*",
"!node_modules/deep-diff/releases{,/**/*}",
"!node_modules/bluebird/js/browser{,/**/*}",
"!node_modules/source-map-support/**/*",
"node_modules/source-map-support/source-map-support.js"
],
"electronWebpack": {
"renderer": {
"dll": [
"vue",
"vue-router",
"vuex",
"element-ui"
]
}
},
...
```
Thanks for your help.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the renderer DLL configuration in package.json and inspect the generated dist/render-dll directory, especially vendor.js and the renderer entry point. Compare the packaged output with the file the renderer expects; done means the DLL build loads without the vendor ReferenceError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript
- Domain
- build-system, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100