diff --git a/shared/pdf-templates/package.json b/shared/pdf-templates/package.json index d640229ae..d636d9d37 100644 --- a/shared/pdf-templates/package.json +++ b/shared/pdf-templates/package.json @@ -4,7 +4,6 @@ "scripts": { "build": "webpack --config webpack.config.js", "lint": "eslint .", - "preview": "vite preview", "storybook:dev": "storybook dev -p 6006", "storybook:build": "storybook build" }, diff --git a/shared/pdf-templates/vite.config.ts b/shared/pdf-templates/vite.config.ts deleted file mode 100644 index a919dfbad..000000000 --- a/shared/pdf-templates/vite.config.ts +++ /dev/null @@ -1,61 +0,0 @@ -import react from '@vitejs/plugin-react'; -import path from 'node:path'; -import { defineConfig } from 'vitest/config'; -import dts from 'vite-plugin-dts'; -import tailwindcss from 'tailwindcss'; -import { UserConfigExport } from 'vite'; -import { name } from './package.json'; - -const app = async (): Promise => { - /** - * Removes everything before the last - * @octocat/library-repo -> library-repo - * vite-component-library-template -> vite-component-library-template - */ - const formattedName = name.match(/[^/]+$/)?.[0] ?? name; - - return defineConfig({ - define: { - isBrowser: 'false', // This will replace isBrowser with false in the bundled code - }, - ssr: { - noExternal: true, - }, - plugins: [ - react(), - dts({ - insertTypesEntry: true, - }), - ], - css: { - postcss: { - plugins: [tailwindcss], - }, - }, - build: { - lib: { - entry: path.resolve(__dirname, 'src/lib/main.ts'), - name: formattedName, - formats: ['es', 'umd'], - fileName: (format: string) => `${formattedName}.${format}.js`, - }, - rollupOptions: { - // external: ['react', 'react/jsx-runtime', 'react-dom', 'tailwindcss'], - // output: { - // globals: { - // react: 'React', - // 'react/jsx-runtime': 'react/jsx-runtime', - // 'react-dom': 'ReactDOM', - // tailwindcss: 'tailwindcss', - // }, - // }, - }, - }, - test: { - globals: true, - environment: 'jsdom', - }, - }); -}; -// https://vitejs.dev/config/ -export default app;