mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-26 01:48:03 +00:00
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.
22 lines
543 B
TypeScript
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",
|
|
},
|
|
},
|
|
});
|