mirror of
https://github.com/penpot/penpot.git
synced 2026-07-03 04:45:28 +00:00
40 lines
867 B
TypeScript
40 lines
867 B
TypeScript
/// <reference types="vitest/config" />
|
|
import { defineConfig } from 'vite';
|
|
|
|
export default defineConfig({
|
|
root: __dirname,
|
|
server: {
|
|
port: 4202,
|
|
host: '0.0.0.0',
|
|
cors: true,
|
|
},
|
|
preview: {
|
|
port: 4202,
|
|
host: '0.0.0.0',
|
|
cors: true,
|
|
},
|
|
resolve: {
|
|
tsconfigPaths: true,
|
|
},
|
|
build: {
|
|
outDir: '../../dist/apps/plugin-api-test-suite',
|
|
// Keep false so `watch` rebuilds don't wipe the sibling tests-bundle.js /
|
|
// headless.js outputs. The `build` script passes --emptyOutDir for a clean
|
|
// one-shot build.
|
|
emptyOutDir: false,
|
|
reportCompressedSize: true,
|
|
commonjsOptions: {
|
|
transformMixedEsModules: true,
|
|
},
|
|
rollupOptions: {
|
|
input: {
|
|
plugin: 'src/plugin.ts',
|
|
index: './index.html',
|
|
},
|
|
output: {
|
|
entryFileNames: '[name].js',
|
|
},
|
|
},
|
|
},
|
|
});
|