slint/tools/figma-inspector/vite.config.code.ts
Nigel Breslaw facd460037
Convert Figma project to Vite + React (#7453)
A Figma plugin is just a single javascript file which means no out of the box way to split files, import helper libraries and scale the project. It's also a vanilla web site for making the UI.

The PR updates the project to use Vite. It allows normal project spliting for typescript and css files. It provides a simpler way for the plugin and backend code to communicate. React is used to then build the plugin interface.
2025-01-27 12:54:09 +02:00

22 lines
543 B
TypeScript

// Copyright © Hyper Brew LLC
// SPDX-License-Identifier: MIT
import { defineConfig } from "vite";
import { figmaCodePlugin } from "vite-figma-plugin";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [figmaCodePlugin()],
build: {
emptyOutDir: false,
outDir: ".tmp",
target: "chrome58",
rollupOptions: {
output: {
manualChunks: {},
entryFileNames: "code.js",
},
input: "./backend/code.ts",
},
},
});