Reputation: 233
The error message is
Uncaught ReferenceError: exports is not defined
The compiled code contains Object.defineProperty(exports,"__esModule",{value:!0})
Found a solution by google: <script> var exports = {}; </script>
but Cannot find module './Index.b211c312.js'
│ index.html
└─_assets
Index.b211c312.js
index.fa062449.js
style.032a3e7d.css
in index.html
<script type="module" src="./_assets/index.fa062449.js"></script>
in index.fa062449.js
require("./Index.b211c312.js")
How to solve this problem?
Upvotes: 2
Views: 923
Reputation: 2658
Update electron-vue-vite to the latest version, there is a fix!
https://github.com/electron-vite/vite-plugin-electron/issues/6#issuecomment-1144833465
Upvotes: 1