shoe-shop/app-heading/vite.config.js
2024-01-21 20:00:22 +01:00

22 lines
540 B
JavaScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import cssInject from "vite-plugin-css-injected-by-js";
import { resolve } from "path";
export default ({ command }) => ({
plugins: [react(), cssInject()],
preview: {
port: 7200,
},
build: {
rollupOptions: {
input: resolve(__dirname, "src/App.jsx"),
preserveEntrySignatures: "exports-only",
external: ["react", "react-dom"],
output: {
entryFileNames: "bundle.js",
format: "esm",
},
},
},
});