Open
Description
Is anyone tried to use Vite to build plugin for Hawtio? I failed with an error:
Uncaught SyntaxError: Cannot use import statement outside a module
vite.config.js
:
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import federation from "@originjs/vite-plugin-federation";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
federation({
name: "project",
filename: "remoteEntry.js",
exposes: {
"./plugin": "./src/project-plugin",
},
shared: ["react"],
}),
],
build: {
modulePreload: false,
target: "esnext",
minify: false,
cssCodeSplit: false,
},
})
I've found the exact line where error occures: core.ts. I thought that module federation do not depend on build tool, but i am certanly not sure:(
CRACO build lasts over 3 minutes on my machine compared to 30 sec with Vite, so i very interested in Vite:)
Metadata
Metadata
Assignees
Type
Projects
Status
Backlog
Activity