0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00
penpot-exporter-figma-plugin/vite.config.ts
Alex Sánchez a079f168df
Analytics (#228)
* metricts-sentry

* fixes

* refactor

* mixpanel integration

* improvements

* improvements

* fixes

* changeset

* fixes

* fixes

* Update .changeset/few-scissors-sleep.md

Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>

* Update manifest.json

Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>

* Update vite.config.ts

Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>

* fixes

* fixes

* fixes

* lint

---------

Co-authored-by: Jordi Sala Morales <jordism91@gmail.com>
2024-10-28 11:22:50 +01:00

42 lines
1,018 B
TypeScript

import { sentryVitePlugin } from '@sentry/vite-plugin';
import react from '@vitejs/plugin-react-swc';
import * as process from 'node:process';
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'
})
],
resolve: {
alias: {
'react': 'preact/compat',
'react-dom': 'preact/compat',
'!../css/base.css': '../css/base.css'
}
},
build: {
emptyOutDir: false,
target: 'esnext',
reportCompressedSize: false,
outDir: '../dist',
rollupOptions: {
external: ['!../css/base.css']
},
sourcemap: true
},
define: {
APP_VERSION: JSON.stringify(process.env.npm_package_version)
}
});