mirror of
https://github.com/penpot/penpot-plugins.git
synced 2025-01-06 14:50:21 -05:00
58 lines
1.2 KiB
TypeScript
58 lines
1.2 KiB
TypeScript
/// <reference types='vitest' />
|
|
import { defineConfig } from 'vite';
|
|
|
|
import { nxViteTsPaths } from '@nx/vite/plugins/nx-tsconfig-paths.plugin';
|
|
|
|
export default defineConfig({
|
|
root: __dirname,
|
|
cacheDir: '../../node_modules/.vite/apps/create-palette-plugin',
|
|
|
|
server: {
|
|
port: 4305,
|
|
host: '0.0.0.0',
|
|
},
|
|
|
|
preview: {
|
|
port: 4305,
|
|
host: '0.0.0.0',
|
|
},
|
|
|
|
plugins: [nxViteTsPaths()],
|
|
|
|
// Uncomment this if you are using workers.
|
|
// worker: {
|
|
// plugins: [ nxViteTsPaths() ],
|
|
// },
|
|
|
|
build: {
|
|
outDir: '../../dist/apps/create-palette-plugin',
|
|
reportCompressedSize: true,
|
|
commonjsOptions: {
|
|
transformMixedEsModules: true,
|
|
},
|
|
rollupOptions: {
|
|
input: {
|
|
plugin: 'src/plugin.ts',
|
|
index: './index.html',
|
|
},
|
|
output: {
|
|
entryFileNames: '[name].js',
|
|
},
|
|
},
|
|
},
|
|
|
|
test: {
|
|
globals: true,
|
|
cache: {
|
|
dir: '../../node_modules/.vitest',
|
|
},
|
|
environment: 'jsdom',
|
|
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
|
|
|
|
reporters: ['default'],
|
|
coverage: {
|
|
reportsDirectory: '../../coverage/apps/create-palette-plugin',
|
|
provider: 'v8',
|
|
},
|
|
},
|
|
});
|