Closed Hulsegge closed 4 months ago
ok i found it, it has nothing to do with VITE it is this tag
The latest powerbi-client
version 2.23.0
seems to have introduced this.
Downgrading to 2.22.4
seems to resolve this.
"powerbi-client": "2.22.4",
"powerbi-client-react": "^1.4.0",
I updated the "powerbi-client" (not "powerbi-client-react") to version 2.23.1, and then the problem was gone!
refer: https://github.com/microsoft/powerbi-client-react/issues/94#issuecomment-2029614741
@Hulsegge ,
The issue you're facing is with the powerbi-client package and it is fixed with the latest version. We shouldn't face any issues with Embedding report even in the React Strict mode. Let us know if you still have any queries.
Hi,
I cloned the demo project and i achieved to show our own report in it. Next i installed the dependencies in our vite template:
I copied the DemoApp.jsx and the other files attached to it. I also added a console.log to the ReportConfig in both project the original demo and our own template. The output is exactly the same (in the end it's the same component running in another project.) However in my vite project i get all the time an error, but im really really sure the embedUrl etc is correct.:
I don't know if this has something to do with my project running yarn and vite ? Are there some limitations? this is how my vite.config.ts looks like:
/ eslint-disable import/no-extraneous-dependencies / ///
///
import react from '@vitejs/plugin-react-swc'; import path from 'path'; // Import path module for file paths import { defineConfig } from 'vite';
// https://vitejs.dev/config/ export default defineConfig(({ mode }) => ({ plugins: [react()], base: './', server: { port: 8080, }, preview: { port: 3000, }, test: { globals: true, environment: 'jsdom', setupFiles: './src/setupTests.ts', }, define: { 'process.env.APP_MODE': JSON.stringify(mode), }, }));