mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
08a9db2df6
PR Summary: 1. Added `Twenty Shared` Package to centralize utilitiies as mentioned in #8942 2. Optimization of `getImageAbsoluteURI.ts` to handle edge cases ![image](https://github.com/user-attachments/assets/c72a3061-6eba-46b8-85ac-869f06bf23c0) --------- Co-authored-by: Antoine Moreaux <moreaux.antoine@gmail.com> Co-authored-by: Charles Bochet <charles@twenty.com>
34 lines
787 B
TypeScript
34 lines
787 B
TypeScript
import * as path from 'path';
|
|
import { defineConfig } from 'vite';
|
|
import dts from 'vite-plugin-dts';
|
|
import tsconfigPaths from 'vite-tsconfig-paths';
|
|
|
|
export default defineConfig({
|
|
root: __dirname,
|
|
cacheDir: '../../node_modules/.vite/packages/twenty-shared',
|
|
|
|
plugins: [
|
|
tsconfigPaths(),
|
|
dts({
|
|
entryRoot: 'src',
|
|
tsconfigPath: path.join(__dirname, 'tsconfig.lib.json'),
|
|
}),
|
|
],
|
|
|
|
// Configuration for building your library.
|
|
// See: https://vitejs.dev/guide/build.html#library-mode
|
|
build: {
|
|
outDir: './dist',
|
|
reportCompressedSize: true,
|
|
commonjsOptions: {
|
|
transformMixedEsModules: true,
|
|
},
|
|
lib: {
|
|
entry: 'src/index.ts',
|
|
name: 'twenty-shared',
|
|
fileName: 'index',
|
|
formats: ['es', 'cjs'],
|
|
},
|
|
},
|
|
});
|