zeronofreya
zeronofreya

Reputation: 233

electron-vue-vite not working after package?

Source Code

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

Answers (1)

yooouuri
yooouuri

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

Related Questions