0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-21 21:23:06 -05:00
penpot-exporter-figma-plugin/vite.config.ts

43 lines
1,018 B
TypeScript
Raw Normal View History

import { sentryVitePlugin } from '@sentry/vite-plugin';
2024-05-13 03:12:58 -05:00
import react from '@vitejs/plugin-react-swc';
import * as process from 'node:process';
2024-04-12 11:52:19 -05:00
import { defineConfig } from 'vite';
import { viteSingleFile } from 'vite-plugin-singlefile';
import svgr from 'vite-plugin-svgr';
import tsconfigPaths from 'vite-tsconfig-paths';
export default defineConfig({
root: './ui-src',
plugins: [
svgr(),
react(),
viteSingleFile({ removeViteModuleLoader: true }),
tsconfigPaths(),
sentryVitePlugin({
org: 'runroom-sl',
project: 'penpot-exporter'
})
],
2024-05-13 03:12:58 -05:00
resolve: {
alias: {
'react': 'preact/compat',
'react-dom': 'preact/compat',
'!../css/base.css': '../css/base.css'
}
},
2024-04-12 11:52:19 -05:00
build: {
2024-05-13 03:12:58 -05:00
emptyOutDir: false,
2024-04-12 11:52:19 -05:00
target: 'esnext',
2024-05-13 03:12:58 -05:00
reportCompressedSize: false,
2024-05-13 03:29:40 -05:00
outDir: '../dist',
2024-05-13 03:29:40 -05:00
rollupOptions: {
external: ['!../css/base.css']
},
sourcemap: true
},
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version)
2024-04-12 11:52:19 -05:00
}
});