Skip to content

Commit

Permalink
[#noissue] Change build tool from tsup to vite@4.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jihea-park committed Feb 4, 2025
1 parent 4fda072 commit c74c5e8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 4 deletions.
8 changes: 4 additions & 4 deletions web-frontend/src/main/v3/packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"types": "./dist/index.d.ts"
},
"./**": "./dist/index.js",
"./dist/pinpoint-fe-common-ui.css": "./dist/index.css",
"./dist/pinpoint-fe-common-ui.css": "./dist/style.css",
"./tailwind.config.js": "./tailwind.config.js"
},
"scripts": {
"format": "prettier --write \"./src/**/*.{js,jsx,ts,tsx}\"",
"dev": "tsup --config ./tsup.config.dev.ts --watch",
"devBuild": "tsup --config ./tsup.config.dev.ts",
"build": "yarn format && yarn lint && tsc && tsup --config ./tsup.config.prod.ts",
"dev": "vite build --watch",
"devBuild": "vite build",
"build": "yarn format && yarn lint && tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
Expand Down
39 changes: 39 additions & 0 deletions web-frontend/src/main/v3/packages/ui/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import path from 'path';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import dts from 'vite-plugin-dts';

export default defineConfig({
plugins: [react(), dts()],
resolve: {
alias: {
'@pinpoint-fe/ui': path.resolve(__dirname, 'src'),
},
},
build: {
lib: {
entry: './src/index.ts',
name: 'index',
formats: ['es'],
fileName: () => `index.js`,
},
rollupOptions: {
external: [
'react',
'react-dom',
'react-router-dom',
'jotai',
'i18next',
'react-i18next',
'tailwindcss',
'tailwindcss-animate',
'tailwind-scrollbar-hide',
'swr',
'@tanstack/react-query',
],
output: {
dir: 'dist',
},
},
},
});

0 comments on commit c74c5e8

Please sign in to comment.