Comments (1)
Vite ์ฑ๋ฅ ์ต์ ํ ๊ตฌ์ฑ (์ฐธ๊ณ ) ํ ๊ธ ํ์ธํด์ ์ค์นํด์ผํจ
main ๋ธ๋์น์์ ์ค์น ํ ํ์๋ค์ pull๋ก ๋น๊ธฐ๊ธฐ
vite.config.js ๋ณ๊ฒฝ
import react from "@vitejs/plugin-react";
import { resolve } from "node:path";
import { defineConfig } from "vite";
import { env } from "node:process";
import viteImagemin from "@vheemstra/vite-plugin-imagemin";
import imageminGifSicle from "imagemin-gifsicle";
import imageminMozjpeg from "imagemin-mozjpeg";
import imageminPngQuant from "imagemin-pngquant";
import imageminSvgo from "imagemin-svgo";
import imageminWebp from "imagemin-webp";
import { splitVendorChunkPlugin } from "vite";
const isDev = env.NODE_ENV === "development";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
splitVendorChunkPlugin(),
viteImagemin({
plugins: {
jpg: imageminMozjpeg(),
png: imageminPngQuant(),
gif: imageminGifSicle(),
svg: imageminSvgo(),
},
makeWebp: {
plugins: {
jpg: imageminWebp(),
png: imageminWebp(),
},
},
}),
],
css: {
devSourcemap: true,
modules: {
generateScopedName: isDev
? "[name]_[local]__[hash:base64:5]"
: "[hash:base64:4]",
},
},
resolve: {
alias: {
"@": resolve(__dirname, "./src"),
},
},
// ๋น๋ ์, ์ฒญํฌ ํ์ผ ์์ฑ ๋งค๋ด์ผ ๊ตฌ์ฑ
build: {
rollupOptions: {
output: {
manualChunks: {
react: ["react", "react-dom"],
reactRouter: ["react-router-dom"],
animations: ["framer-motion", "gsap"],
},
},
},
},
});
```
from escape12.
Related Issues (20)
- โจMyCommunity ํ์ด์ง
- ๐จ๏ธ Tooltip ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ค์น HOT 1
- โ9์ 19์ผ ํธ๋ฌ๋ธ์ํ ๋ฐฉ 11:00 - 11:25 ์ง๋ฌธ HOT 2
- โ 9์ 18์ผ Todo HOT 4
- ๐ช๊ฐ ํ์ด์ง ๋ณ ๋ณ๊ฒฝ ์ฌํญ HOT 2
- โ 9์ 20์ผ Todo HOT 7
- ๐๊ฒ์ ์์ง ๋ฉํํ๊ทธ
- โ 9์ 21์ผ Todo HOT 2
- ๐ ์ด๋ฏธ์ง ์ต์ ํ HOT 1
- ๐จ์ฝ๋ ์ต์ข ์์ ๋ฐ ๊ธฐ๋ฅ ์์ HOT 1
- โ 9์ 22์ผ Todo HOT 5
- โ ๊ฐ ํ์ด์ง ๋ณ useQuery๋ก ์ฝ๋ ๋ณ๊ฒฝ HOT 1
- ๐์ต์ข ๋ฐฐํฌ ์ดํ ์ฑ ์ฌ๊ตฌ์ฑ HOT 1
- ๐จํ์ด์ง ์ ํ ์ ๋๋ฉ์ด์
- โ ๏ธ๊ถ์ฅ์ฌํญ ์์ ํ๊ธฐ
- โจMyComment ํ์ด์ง
- โจ์ฑํ ๊ธฐ๋ฅ ์ถ๊ฐ HOT 1
- ๐จ ๋ฐฐํฌ ํ ์ฑ๋ฅ ๊ฒ์ฌ HOT 1
- โ 9์ 23, 24์ผ Todo HOT 5
- ๐๏ธgif ๋ฐ๊ธฐ HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from escape12.