mubaidr / vite-vue3-browser-extension-v3

Another vite powered web extension (chrome, firefox, etc.) starter template.
506 stars 67 forks source link

error when starting the project: __DISPLAY_NAME__ is not defined #71

Closed dimaaash closed 5 months ago

dimaaash commented 5 months ago

Hello,

I am very interested in this starter/template project for building some vue/vite powered browser extensions.

When i start the project with

npm run dev it starts fine.

I then try to load the chrome extension from the dist folder as instructed but it shows me:

Uncaught ReferenceError: __DISPLAY_NAME__ is not defined
    at app.vue:12:27
    at callWithErrorHandling (chunk-HS45CFH5.js?v=81710182:1659:19)
    at callWithAsyncErrorHandling (chunk-HS45CFH5.js?v=81710182:1666:17)
    at ReactiveEffect.getter [as fn] (chunk-HS45CFH5.js?v=81710182:3361:16)
    at ReactiveEffect.run (chunk-HS45CFH5.js?v=81710182:435:19)
    at doWatch (chunk-HS45CFH5.js?v=81710182:3462:13)
    at watchEffect (chunk-HS45CFH5.js?v=81710182:3256:10)
    at setup (app.vue:9:1)
    at callWithErrorHandling (chunk-HS45CFH5.js?v=81710182:1659:19)
    at setupStatefulComponent (chunk-HS45CFH5.js?v=81710182:9073:25)
image

I have tried adding the .env file with the following:

__DISPLAY_NAME__=TEST
__DISPLAY_VERSION__=1.0.0
__DISPLAY_DESCRIPTION__=Test
__DISPLAY_AUTHOR__=Test

But still the browser does not seem to accept the extension.

Thank you for your time!

mubaidr commented 5 months ago

Apologies for inconvenience, I will try to fix it ASAP

mubaidr commented 5 months ago

Fixed in: https://github.com/mubaidr/vite-vue3-chrome-extension-v3/commit/b345acc72ac5ba4db1faaab041836e5ac1770aa6