Replies: 1 comment
-
We're also running into a similar issue. I think you may have better luck asking this in the vite-plugin-federation repo :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi All,
I want to use posthog library as a shared dependency.
Adding it to the shared section in the vite config, is leading to white screen.
The config is as below.
// https://vitejs.dev/config/
export default defineConfig(() => {
return {
base: "",
root: "./",
server: {
port: 5104,
},
preview: {
port: 5104,
},
plugins: [
checker({ typescript: true }),
react(),
tsconfigPaths(),
filament({
vanillaExtractOptions: {
identifiers: ({ hash }) =>
admin_${hash}
,unstable_mode: "transform",
},
}),
svgr(),
federation({
name: "admin",
filename: "remoteEntry.js",
exposes: {
"./Admin": "./src/pages/admin/Admin.tsx",
},
shared: [
"react",
"react-dom",
"react-router-dom",
"use-sync-external-store/shim/index.js",
"posthog-js",
],
}),
],
build: {
modulePreload: false,
target: "esnext",
minify: false,
cssCodeSplit: false,
assetsDir: "assets",
},
optimizeDeps: {
exclude: ["@copernicus-ui/components"],
},
};
});
Beta Was this translation helpful? Give feedback.
All reactions