TypeError: i[e] is not a function #115
-
Hello, im running two projects with vite:
Remote:
I can see the remoteEntry.js under: http://localhost:5050/assets/remoteEntry.js Importing in my host app like this: But when i check it in the browser i get this error: Any one got an idea, what the problem might be, this is the simplest setup i could figure out. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I have a similar error import { defineConfig } from "vite";
import federation from "@originjs/vite-plugin-federation";
// https://vitejs.dev/config/
export default defineConfig({
server: {
port: 3004,
},
build: {
// lib: {
// entry: "src/wc-spa.js",
// formats: ["es"],
// },
rollupOptions: {
external: /^lit/,
output: {
format: "system",
minifyInternalExports: false,
},
},
},
plugins: [
federation({
name: "vite-lit",
filename: "remoteEntry.js",
library: { type: "system" }, // I'm not sure
format: "systemjs", // I'm not sure
exposes: {
"./MyElement": "./src/wc-spa.js",
},
shared: ["lit"],
}),
],
}); I'am tring to use systemjs - vite - lit element - single spa and federation |
Beta Was this translation helpful? Give feedback.
-
Could you tell me the version of vite-plugin-federation you are using? If it's a federation issue, I suggest you initiate an issue in the vite-plugin-federation repository so I can be alerted and resolve the issue faster,thx |
Beta Was this translation helpful? Give feedback.
Could you tell me the version of vite-plugin-federation you are using? If it's a federation issue, I suggest you initiate an issue in the vite-plugin-federation repository so I can be alerted and resolve the issue faster,thx