You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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