Files
ComfyUI_frontend/vite.config.mts
filtered c0e8b33716 Snap everything to grid (#315)
* Implement snap to grid

- Moves positioning logic to LGraph
- Simplifies code
- Adds Pointer API to alt-clone node
- Removes always_round_positions, replaced by always snap to grid (default size is 1 when always snapping)

Fix refator error

* Fix group items snapped without group

* Allow snapping of all items

- Add snapToGrid to Positionable
- Impl. on all types
- Deprecated: alignToGrid is now a wrapper

* Fix test import alias, update expectations

* Prevent desync of before / after change events

Adds ability to perform late binding of finally() during drag start.

* nit - Refactor

* Fix unwanted snap on node/group add

* nit - Doc

* Add shift key state tracking for snap to grid

Private impl., no state API as yet.

* Add snap guides rendering

Nodes, reroutes

* Optimisation - reroute rendering

 Fixes exponential redraw

* Add snap guidelines for groups
2024-11-18 10:12:20 -05:00

38 lines
795 B
TypeScript

/// <reference types='vitest' />
import { defineConfig } from 'vite'
import path from 'path'
import dts from 'vite-plugin-dts'
export default defineConfig({
build: {
lib: {
entry: path.resolve(__dirname, 'src/litegraph'),
name: 'litegraph.js',
fileName: (format) => `litegraph.${format}.js`,
formats: ['es', 'umd']
},
sourcemap: true,
target: ['es2022'],
},
esbuild: {
minifyIdentifiers: false,
minifySyntax: false,
},
plugins: [
dts({
entryRoot: 'src',
insertTypesEntry: true,
include: ['src/**/*.ts'],
outDir: 'dist',
aliasesExclude: ['@'],
}),
],
resolve: {
alias: { '@': '/src' },
},
test: {
alias: { '@/': path.resolve(__dirname, './src/') },
environment: 'jsdom',
},
})