Closed glennmichael123 closed 6 months ago
I have this same issue.
Same issue here, anyone have a solution?
Logging shows it is a function { default: [Function: flareSourcemapUploader] }
.
This worked for me.
flareSourcemapUploader.default({ key: "Public key here" })
Same issue! Thanks to @a4anthony for a workaround
This issue indicates a problem with our build step. using .default
is a workaround at best, which might not work after building your project to a different target and isn't compatible with typescript types.
I'll look into finding a more reliable package building tool.
@Sam-Apostel Thank you for looking into this as this issue has swayed me from using Flare with Vite configs.
The same here. @Sam-Apostel do we have an ETA on a proper fix? Thanks!
Hello -- I ran into this today, too:
TypeError: flareSourcemapUploader is not a function
.
I'm using Vite. Here's my package.json:
{
"private": true,
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.6",
"@tailwindcss/typography": "^0.5.10",
"alpinejs": "^3.10.5",
"autoprefixer": "^10.4.16",
"axios": "^0.25",
"jquery-ui": "^1.13.2",
"laravel-mix": "^6.0.6",
"laravel-vapor": "^0.6.0",
"laravel-vite-plugin": "^0.7.8",
"lodash": "^4.17.19",
"postcss": "^8.4.31",
"postcss-import": "^12.0.1",
"tailwindcss": "^3.3.3",
"tippy.js": "^6.3.7",
"vite": "^4.4.9"
},
"dependencies": {
"@flareapp/flare-client": "^3.0.5", // 👈
"@flareapp/vite-plugin-sourcemap-uploader": "^1.0.3", // 👈
"bootstrap-select": "^1.13.18",
"medium-editor": "^5.23.3",
"tw-elements": "^1.0.0-beta2"
},
"description": "```bash\r cp .env.example .env",
"version": "1.0.0",
"main": "tailwind.config.js",
"directories": {
"test": "tests"
},
"keywords": [],
"author": "",
"license": "ISC",
}
I'm using flareSourcemapUploader.default({ key: "Public key here" })
as a workaround for now.
Dear contributor,
because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.
When I tried using this function inside the plugin it throws this error
failed to load config from vite.config.ts error when starting dev server: TypeError: flareSourcemapUploader is not a function at vite.config.ts.timestamp-1679534839280.mjs:37:5 at ModuleJob.run (node:internal/modules/esm/module_job:194:25) ELIFECYCLE Command failed with exit code 1.
Here is the code in question: